Skip to content

Commit

Permalink
minor fixes in lettrines.mp and in the english version of the book
Browse files Browse the repository at this point in the history
  • Loading branch information
jemmybutton committed Jan 16, 2019
1 parent e37e68c commit 6ce4d5f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
24 changes: 12 additions & 12 deletions byrne_context.tex
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
{\tfa github.com/jemmybutton}
\vskip 0.25\baselineskip

{\tfb 2018 ed.\,0.7}
{\tfb 2019 ed.\,0.7}
\vskip \baselineskip

\symbol[cc][cc] \symbol[cc][by] \symbol[cc][sa]
Expand Down Expand Up @@ -2176,9 +2176,9 @@
byLineDefine(C, A, byyellow, 1, 0);
draw byNamedLineSeq(0)(BC,CA);
draw byNamedLineSeq(0)(AD,AB,BE);
draw byLine.L'(LI, LII, byblack, 1, 0);
draw byLine.L''(LIII, LIV, byred, 1, 0);
draw byLine.L'''(LV, LVI, byblue, 1, 0);
draw byLineWithName (LII, LI, byblack, 1, 0)(L');
draw byLineWithName (LIV, LIII, byred, 1, 0)(L'');
draw byLineWithName (LVI, LV, byblue, 1, 0)(L''');
draw byCircle.B(B, E, byred, 0, 0, 0);
draw byLabelsOnPolygon(D, A, C)(2, 0);
draw byLabelsOnPolygon(E, B, A)(2, 0);
Expand Down Expand Up @@ -11896,8 +11896,8 @@
byLineDefine(C, D, byblue, 0, 0);
byLineDefine(C, H, byred, 0, 0);
draw byNamedLineSeq(0)(CD,CH);
draw byLine.E(Ee, Eb, byred, 1, 0);
draw byLine.F(Fe, Fb, byblack, 1, 0);
draw byLineWithName(Ee, Eb, byred, 1, 0)(E);
draw byLineWithName(Fe, Fb, byblack, 1, 0)(F);
draw byLabelsOnPolygon(F, G, A, B)(0, 0);
draw byLabelsOnPolygon(E, H, C, D)(0, 0);
draw byLabelLine(0)(E, F);
Expand Down Expand Up @@ -11964,10 +11964,10 @@
byLineDefine(E, F, byblack, 0, 0);
byLineDefine(E, H, byred, 0, 0);
draw byNamedLineSeq(0)(EF,EH);
draw byLine.A(Ab, Ae, byred, 0, 0);
draw byLine.B(Bb, Be, byblue, 0, 0);
draw byLine.C(Cb, Ce, byblack, 0, 0);
draw byLine.D(Db, De, byyellow, 0, 0);
draw byLineWithName(Ab, Ae, byred, 0, 0)(A);
draw byLineWithName(Bb, Be, byblue, 0, 0)(B);
draw byLineWithName(Cb, Ce, byblack, 0, 0)(C);
draw byLineWithName(Db, De, byyellow, 0, 0)(D);
draw byLabelLine(0)(A, B, C, D);
draw byLabelPolygon(1)(ABCD);
draw byLabelPolygon(1)(EFGH);
Expand Down Expand Up @@ -12291,10 +12291,10 @@
draw byPolygon.GH(G,H,Na,Nb,Nc,Nd)(white);
draw byLine(A, B, byblack, 0, 0);
draw byLine(C, D, byblue, 0, 0);
draw byLine.O(Ob, Oe, byblack, 1, 0);
draw byLineWithName(Ob, Oe, byblack, 1, 0)(O);
draw byLine(E, F, byred, 0, 0);
draw byLine(G, H, byyellow, 0, 0);
draw byLine.P(Pb, Pe, byred, 1, 0);
draw byLineWithName(Pb, Pe, byred, 1, 0)(P);
byPointLabelRemove(Ma, Mb, Mc, Md, Na, Nb, Nc, Nd, K, L);
draw byLabelLine(1)(AB,CD,EF,GH,O,P);
}
Expand Down
2 changes: 1 addition & 1 deletion byrne_ru_context.tex
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
{\tfa github.com/jemmybutton}
\vskip 0.25\baselineskip

{\tfb 2018 изд.\,0.4}
{\tfb 2019 изд.\,0.4}
\vskip \baselineskip

\symbol[cc][cc] \symbol[cc][by] \symbol[cc][sa]
Expand Down
18 changes: 13 additions & 5 deletions lettrines/lettrines.mp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,11 @@ def addBranch (expr p, o, a, sty, cn) =
branchBuds[totalBranchesNumber] := generateBranchesTemplate(branchMeristem[totalBranchesNumber]);
branchOutline[totalBranchesNumber] := pathOutline(branchPath[totalBranchesNumber], 1/2);
branchOrientation[totalBranchesNumber] := o;
branchIsActive[totalBranchesNumber] := a;
if branchProductive[sty]:
branchIsActive[totalBranchesNumber] := a;
else:
branchIsActive[totalBranchesNumber] := 2;
fi;
branchStyle[totalBranchesNumber] := sty;
branchIsCloneOf[totalBranchesNumber] := cn;
enddef;
Expand All @@ -298,25 +302,29 @@ picture currentLetter, cL;
path branchPath[], branchMeristem[], branchBuds[], branchOutline[], branchTemplate[], candidateBranch;
numeric branchOrientation[], branchStyle[], branchIsCloneOf[], branchIsActive[], candidateBranchOrientation, symMode, numberOfIterations, totalBranchesNumber, branchScalePrecision;
numeric ln[], ll, lc;
boolean branchProductive[];
pair branchMeristemSpan[];
string shuffledNumbers;
picture lettrineImage;

branchProductive[-1] := true;
branchTemplate0 := ((1/2,0) for a := 60 step 60 until 360: .. (cosd(a), sind(a)) scaled 1/2(1-a/360) endfor) shifted (-1/2, 0);
branchTemplate1 := branchTemplate0 yscaled -1;
branchMeristemSpan0 := (1/2, length(branchTemplate0) - 2);
branchProductive0 := true;
branchTemplate2 := ((1/2,0) for a := 60 step 60 until 630: .. (cosd(a), sind(a)) scaled 1/2(1-a/540) endfor) shifted (-1/2, 0);
branchTemplate3 := branchTemplate2 yscaled -1;
branchMeristemSpan1 := (1/2, length(branchTemplate2) - 3);
branchProductive1 := true;
branchTemplate4 := (0, 0){dir(90)} .. (-1/2, 1) .. (-1, 1/2) .. (-1/2, 2/3) .. {dir(-90)} cycle;
branchTemplate5 := (branchTemplate4 rotated 30) yscaled -1;
branchMeristemSpan2 := (1/5, 1/4);
branchProductive2 := false;
branchTemplate6 := (0, 0){dir(90)} .. (-1/2, 1) .. {dir(-90)}(-1, 1/2){dir(60)} .. {dir(-90)} cycle;
branchTemplate7 := (branchTemplate6 rotated 45) yscaled -1;
branchMeristemSpan3 := (1/5, 1/4);
%branchTemplate4 := ((1/2,0) for a := 60 step 60 until 630: .. (cosd(a), sind(a)) scaled 1/2(1-a/540) endfor) shifted (-1/2, 0);
%branchTemplate5 := branchTemplate4 yscaled -1;
%branchMeristemSpan2 := (1/2, length(branchTemplate2) - 3);
branchProductive3 := false;


string lettrinesFile, l, ls[];
lettrinesFile := "lettrineslist.txt";
Expand Down Expand Up @@ -354,7 +362,7 @@ forever:
totalBranchesNumber := -1;
if ((l <> "plate") and (l <> "tile")):
symMode := 0;
numberOfIterations := 8;
numberOfIterations := 9;
minBranchLength[0] := 1/6cm;
minimalDistance := 1/18cm;
budDistance := 1/4mm;
Expand Down

0 comments on commit 6ce4d5f

Please sign in to comment.