Penrose Tiles

Chapter Opening Art Code

.  Nonperiodic Tilings

.  Penrose Tilings

ϕ=N[GoldenRatio];
startTriangle={{0.5,Sin[72°]ϕ},{1,0},{0,0},1};

dissect[{p_,q_,r_,1}]:={{r,newpoint=(ϕ q+p)(2-ϕ),q,1},{r,newpoint,p,-1}}
dissect[{p_,q_,r_,-1}]:={{r,newpoint=(ϕ r+p)(2-ϕ),q,-1},{p,q,newpoint,1}}
dissect[triangles_List]:=(type*=-1;
Join[Cases[triangles,{__,-type}],Flatten[dissect/@Cases[triangles,{__,type}],1]])

TriangleDissection[n_]:=(type=1;
Graphics[{Thickness[0.01],{Red,Nest[dissect,startTriangle,n]}/.
{p_,q_,r_,x_}:>{Line[{q,r,p}],Blue,Line[{p,q}]}}, ImageSize->80]);

Grid[Append[Map[TriangleDissection,{{1,2,3,4},{5,6,7,8}},{2}],{"" ,TriangleDissection[9],TriangleDissection[10],""}]]

x0=First[x/.Solve[Tan[72°] x==1-2 x,x]]
y1 = x0 Tan[72°];

KitesAndDarts[n_,opts___]:=(type=1;Graphics[
{{Thickness[0.002],{Red,Nest[dissect,startTriangle,2 n]}/.{p_,q_,r_,i_}:>{If[i==1,{RGBColor[0.4,0.4,1],EdgeForm[],Polygon[{p,q,r}]},{}],Line[{q,r,p}]}},{Thickness[0.015],Line[ReplacePart[startTriangle,First[startTriangle],4]]}},opts]);

KitesAndDarts[6]

KitesAndDarts[8,PlotRange->{{x0,1-x0},{0,y1}},Frame->True, PlotRangeClipping->True, FrameTicks->None,FrameStyle->Thickness[0.01]]

.  Penrose Rhombs

Rhombs[n_,opts___]:=(type=1;Graphics[
{{Thickness[0.005],Nest[dissect,startTriangle,2 n+1]/.{{p_,q_,r_,1}:>Line[{r,p,q}],{p_,q_,r_,-1}:>{EdgeForm[Thickness[0.005]],FaceForm[RGBColor[0.4,0.4,1]],Polygon[{p,q,r}]}}},{Thickness[0.015],Line[ReplacePart[startTriangle,First[startTriangle],4]]}},opts]);

Rhombs[4]

Rhombs[8,PlotRange->{{x0,1-x0},{0,y1}},Frame->True, PlotRangeClipping->True, FrameTicks->None,FrameStyle->Thickness[0.01]]/. Thickness[0.005]-> Thickness[0.002]