Skip to content

Commit

Permalink
Some spelling corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
thruston committed Oct 30, 2024
1 parent be7744b commit 8385902
Show file tree
Hide file tree
Showing 9 changed files with 322 additions and 313 deletions.
Binary file modified Drawing-with-Metapost.pdf
Binary file not shown.
583 changes: 294 additions & 289 deletions src/Drawing-with-Metapost.tex

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/dwmpcode.sty
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ morestring=[s]{btex}{etex}%
\lstnewenvironment{code}[1][]{\mpstyle\lstset{#1}}{}
\newcommand\mpexternal[2][]{{\mpstyle\lstinputlisting[#1]{#2}}}
\newcommand\smallmpexternal[2][]{{\mpstyle\lstinputlisting[basicstyle=\small\ttfamily,#1]{#2}}}
\newcommand\mpl[1]{{\mpstyle\lstinline!#1!}}
\newcommand\mpl[1]{{\normalfont\mpstyle\lstinline!#1!}}
%
\newcommand\texstyle{\lstset{
language=[LaTeX]Tex,
Expand Down
13 changes: 7 additions & 6 deletions src/tiling-conway.mp
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
input colorbrewer-rgb
input tiling-pinwheel-macro
beginfig(1);
pair a, b, c, d, e, f, g;
a = origin; b = 180 right; c = 90 up;
d = 2/5[b, c]; e = 4/5[b,c]; f = 1/2[e, a]; g = 1/2[a, b];
a = origin; b = 180 right; c = 1/2 b rotated 90;
d = 1/2[a,b]; e = 1/5[c,b]; f = 1/2[a,e]; g = 1/2[b,e];
pinwheel(1,a,b,c,"");

fill a--b--c--cycle withcolor 15/16[blue, white];
draw a--b--c--a--e--g--f; draw g--d;
dotlabel.llft("$a$", a);
dotlabel.lrt ("$b$", b);
dotlabel.ulft("$c$", c);
dotlabel.urt ("$d$", d);
dotlabel.bot ("$d$", d);
dotlabel.urt ("$e$", e);
dotlabel.ulft("$f$", f);
dotlabel.bot ("$g$", g);
dotlabel.urt ("$g$", g);
endfig;
\end{mplibcode}
\end{document}
Binary file modified src/tiling-conway.pdf
Binary file not shown.
15 changes: 15 additions & 0 deletions src/tiling-pinwheel-macro.mp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
input colorbrewer-rgb
vardef pinwheel(expr level, a, b, c, s) =
if level = 0:
fill a--b--c--cycle withcolor s;
draw a--b--c--cycle;
else:
save d, e, f, g; pair d, e, f, g;
d = 1/2[a,b]; e = 1/5[c,b]; f = 1/2[a,e]; g = 1/2[b,e];
pinwheel(level - 1, f, d, e, Blues 9 2);
pinwheel(level - 1, f, d, a, Blues 9 3);
pinwheel(level - 1, e, a, c, Blues 9 4);
pinwheel(level - 1, g, e, d, Blues 9 5);
pinwheel(level - 1, g, b, d, Blues 9 6);
fi
enddef;
20 changes: 4 additions & 16 deletions src/tiling-subs-pinwheel.mp
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,12 @@
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
input colorbrewer-rgb
vardef pinwheel(expr level, a, b, c, s) =
if level = 0:
fill a--b--c--cycle withcolor s;
undraw a--b--c--cycle withpen pencircle scaled 1/16;
else:
save d, e, f, g; pair d, e, f, g;
d = 2/5[b, c]; e = 4/5[b,c]; f = 1/2[e, a]; g = 1/2[a, b];
pinwheel(level - 1, f, g, e, Blues 9 2);
pinwheel(level - 1, f, g, a, Blues 9 3);
pinwheel(level - 1, e, a, c, Blues 9 4);
pinwheel(level - 1, d, e, g, Blues 9 5);
pinwheel(level - 1, d, b, g, Blues 9 6);
fi
enddef;
input tiling-pinwheel-macro
beginfig(1);
pair a, b, c; a = origin; b = 460 right; c = 1/2 b rotated 90;
pinwheel(5, a, b, c, "");
drawoptions(withpen pencircle scaled 1/8 withcolor white);
pinwheel(5, a, b, c, "");
drawoptions();
draw currentpicture rotatedabout(1/2[b,c], 180);
currentpicture := currentpicture rotated 90;
endfig;
Expand Down
Binary file modified src/tiling-subs-pinwheel.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion src/tiling-subs-triangle.mp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ vardef tall(expr level, a, b, c) =
fill a--b--c--cycle withcolor 3/4[blue, white];
draw a--c--b;
else:
save m; pair m; m = 1/3 (a + b + c); % the median
save m; pair m; m = 1/3 (a + b + c); % the centroid
wide(level - 1, a, b, m);
wide(level - 1, b, c, m);
wide(level - 1, c, a, m);
Expand Down

0 comments on commit 8385902

Please sign in to comment.