Polyhedra

Math 282 Computational Geometry

Mathematica knows about many classes of polyhedra:

PolyhedronData["Classes"]

We can list all of the Archimedean polyhedra:

PolyhedronData["Archimedean"]

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

colorize[GraphicsComplex[v_,Polygon[poly_]]]:=Module[{color=Association[{3->Red,4->Orange,5->Yellow,6->Green,8->Blue,10->Purple}]},GraphicsComplex[N[v],({Glow[color[Length[First[#]]]],Polygon[#]}&)/@SplitBy[Sort[poly],Length]]]

Try it out on a cuboctahedron:

Graphics3D[colorize[PolyhedronData["Cuboctahedron","GraphicsComplex"]],Sequence[Boxed->False,Lighting->None,Method->{"ShrinkWrap"->True}]]

We can draw all of the Archimedian polyhedra at once like this:

GraphicsGrid[Partition[Graphics3D[Tooltip[colorize[PolyhedronData[#,"GraphicsComplex"]],#],Sequence[Boxed->False,Lighting->None,Method->{"ShrinkWrap"->True}]]&/@PolyhedronData["Archimedean"],UpTo[5]]]

Here are all of the Johnson polyhedra:

GraphicsGrid[Partition[Graphics3D[Tooltip[colorize[PolyhedronData[#,"GraphicsComplex"]],#],Sequence[Boxed->False,Lighting->None,Method->{"ShrinkWrap"->True}]]&/@PolyhedronData["Johnson"],UpTo[15]]]