RP[a_,k_]:=Module[{v},
v={{{k,k,k},{k,k,k-1},{k-1,k,k},
{k,k-1,k}},{{k-1,k-1,k},
{k-1,k-1,k-1},{k-1,k,k},
{k,k-1,k}},{{k,k,-k},{k,k,-k+1},
{k-1,k,-k},{k,k-1,-k}},
{{k-1,k-1,-k},{k-1,k-1,-k+1},
{k-1,k,-k},{k,k-1,-k}}};
RotationTransform[a,{0,1,1}]/@v//N];
CC[t_]:=ColorData["Crayola"][t+10];
RPG[n_,k_,s_]:=Graphics3D[Table[{CC[i],
Opacity[.3],EdgeForm[Gray],
Polyhedron[RP[i*Pi/n,k]]},{i,2n}],
Boxed->False,ImageSize->s,
ViewPoint->{k+1,k+1,k}];
RPG[11,1,600]
v={{{k,k,k},{k,k,k-1},{k-1,k,k},
{k,k-1,k}},{{k-1,k-1,k},
{k-1,k-1,k-1},{k-1,k,k},
{k,k-1,k}},{{k,k,-k},{k,k,-k+1},
{k-1,k,-k},{k,k-1,-k}},
{{k-1,k-1,-k},{k-1,k-1,-k+1},
{k-1,k,-k},{k,k-1,-k}}};
RotationTransform[a,{0,1,1}]/@v//N];
CC[t_]:=ColorData["Crayola"][t+10];
RPG[n_,k_,s_]:=Graphics3D[Table[{CC[i],
Opacity[.3],EdgeForm[Gray],
Polyhedron[RP[i*Pi/n,k]]},{i,2n}],
Boxed->False,ImageSize->s,
ViewPoint->{k+1,k+1,k}];
RPG[11,1,600]
No comments:
Post a Comment