First there’s the simple code for making rhombuses and grouping them together that I’ve posted before:
In[]:=
rhombus[{x_,y_},ϕ_,θ_]:=Polygon[(({x,y}+#1&)/@Prepend[{#1[[1]],#1[[1]]+#1[[2]],#1[[2]]},{0,0}]&)[{{Cos[θ],Sin[θ]},{Cos[θ+ϕ],Sin[θ+ϕ]}}]];basicblock[{x_,y_},ϕ_,t_,ψ_,n_]:=Table[{rhombus[{x,y},ϕ,θ+t],rhombus[{x+Cos[θ+t]+Cos[θ+t+ϕ],y+Sin[θ+t]+Sin[θ+t+ϕ]},ϕ,θ+ψ]},{θ,0,2π-(2π)/n,(2π)/n}];
Next, to get the rotations to spiral in, I borrowed the following code from Kuba, who was using it to generate the Ulam spiral:
In[]:=
spiral[n_?OddQ]:=Nest[With[{d=Length@#,l=#[[-1,-1]]},Composition[Insert[#,l+3d+2+Range[d+2],-1]&,Insert[#,l+2d+1+Range[d+1],1]&,Insert[#,l+d+Range[d+1,1,-1],1]&,Insert[#,l+Range[d,1,-1],-1]&][#]]&,{{1}},(n-1)/2];
And now here’s the Manipulate:
In[]:=
DynamicModule[{ϕ=π/6,n=16,sp},sp=spiral[5];Manipulate[Graphics[{FaceForm[None],EdgeForm[Directive[GrayLevel[45/255],JoinForm["Round"],Thickness[.002]]],Table[basicblock[10{x,y},ϕ,0,-ψ+2(26-sp[[3-y,3+x]])/25π,n][[;;,2]],{x,-2,2},{y,-2,2}]},PlotRange->30,ImageSize->540,Background->RGBColor[{242,240,241}/255]],{ψ,0,2π}],SaveDefinitions->True]
Out[]=

