Sunday, December 29, 2019

Random Polygons as Layers


PPRT3D[col_,s_]:=Module[{a,b,c,d},
a=RandomInteger[{3,8}];b=RandomInteger[{9,16}];
c=RandomInteger[{3,25}];d=RandomInteger[{5,11}];
PF=Function[{i,t,a,b,c,d},
{Cos[2i*t/d+2i*Pi/c]+Cos[2a*i*t/d+2i*Pi/c]+
Cos[2b*i*t/d+2i*Pi/c],
Sin[2i*t/d+2i*Pi/c]-Sin[2a*i*t/d+2i*Pi/c]+
Sin[2b*i*t/d+2i*Pi/c],
5i/c}];
Show[Table[ParametricPlot3D[PF[i,t,a,b,c,d],
{t,0,a*b*c*d*Pi},PlotStyle->{ColorData[col][i/c],
Thickness[.001]}],{i,c}],PlotPoints->100,
PlotRange->All,Axes->False,Boxed->False,ImageSize->s]]
PPRT3D["Pastel",600]

No comments:

Post a Comment