DPG[n_,m_,s_]:=Module[{dp,col},
dp=AnglePath[{-Pi/2,0,Pi/2}[[1+Nest[Join[#,{2},Reverse[2-#]]&,{1},n]]]];
Graphics[Table[{Hue[.12Mod[i,9]],Rotate[Line[dp],i*Pi/m]},
{i,2m}],ImageSize->s,Background->RGBColor["silver"]]];
{DPG[12,4,300],DPG[8,18,300]}
DPG[16,5,600]
No comments:
Post a Comment