Polyhedra

MATH 261 Computational Geometry

Here is a function that draws a polyhedron:

draw3D[poly_]:=Graphics3D[{EdgeForm[Thick],FaceForm[Opacity[0.9]],PolyhedronData[poly,"GraphicsComplex"]},Boxed->False]

Try it out:

draw3D["Cube"]

The next function colors faces of polyhedra by their number of edges. (Code modified from https://reference.wolfram.com/language/ref/PolyhedronData.html .)

colorFaces3D[poly_]:=Module[
{color=Association[{3->Red,4->Orange,5->Yellow,6->Green,7->Cyan,8->Blue,9->Magenta,10->Purple}],
gc=PolyhedronData[poly,"GraphicsComplex"]},
Graphics3D[
GraphicsComplex[N[gc[[1]]],({Glow[color[Length[First[#]]]],Polygon[#]}&)/@SplitBy[Sort[gc[[2,1]]],Length]],
Sequence[Boxed->False,Lighting->None,Method->{"ShrinkWrap"->True}]
]
]

Try it out :

colorFaces3D["GreatRhombicosidodecahedron"]