Graphics`Polyhedra`
A Platonic solid is a convex polyhedron whose faces and vertices are all of the same type. There are five such solids. There are also a few nonconvex polyhedra known that have faces and vertices all of the same type. This package contains the graphics primitives necessary for rendering these solids.
Displaying the regular polyhedra.
Polyhedra.
This loads the package.
In[1]:= <<Graphics`Polyhedra`
This displays a dodecahedron centered at the origin.
In[2]:= Show[ Polyhedron[ Dodecahedron ]]
Out[2]=
This displays two polyhedra simultaneously. The diameter of the icosahedron is reduced by a factor of 0.7 and its center is moved to the point {3, 3, 3}.
In[3]:= Show[ Polyhedron[GreatStellatedDodecahedron], Polyhedron[Icosahedron, {3, 3, 3}, 0.7] ]
Out[3]=
Transformation functions for the regular polyhedra.
The polyhedra are by default centered at the origin with a unit distance from the origin to the midpoint of the edges. Any of the convex solids can be stellated using Stellate. This replaces each of the polygon faces by a pyramid with the polygon as its base. The user can also adjust the stellation ratio. Note that ratios less than give concave figures and that the default value of this ratio is . Geodesate triangulates fivesided or greater polygons before projecting onto the circumscribed sphere. If the order n of the regular tessellation of each face is not given, a default value of is assumed. The default position of the sphere is 0,0,0 with radius . Truncate and OpenTruncate act on every polygon and truncate at each vertex of the polygon. The default value of the truncation ratio is .
Here is a stellated octahedron with stellation ratio equal to . This gives very long points.
In[4]:= Show[Stellate[Polyhedron[Octahedron], 4.0]]
Out[4]=
Here is an example of a polyhedron that is triangulated before being projected onto the circumscribed sphere.
In[5]:= Show[Geodesate[Polyhedron[Dodecahedron], 4]]
Out[5]=
Here is a an example of a polyhedron with edges truncated on each side by 40 percent.
In[6]:= Show[Truncate[ Polyhedron[Dodecahedron], .4]]
Out[6]=
OpenTruncate allows you to view the interior of the truncated polyhedron.
In[7]:= Show[OpenTruncate[ Polyhedron[Dodecahedron], .4]]
Out[7]=
Polyhedron converts the polygon list corresponding to the name of a polyhedron into a Graphics3D object. You can extract the polygon list from the Graphics3D object using First. In addition, Vertices and Faces give you the vertex coordinates and the vertices comprising each face of the polyhedra.
Getting face and vertex data.
Here is the list of polygons for the tetrahedron centered at the origin.
In[8]:= First[ Polyhedron[ Tetrahedron ] ]
Out[8]=
These are the vertices of the tetrahedron.
In[9]:= Vertices[ Tetrahedron ]
Out[9]=
This shows which vertices are associated with which face. For example, the second face has the first, third, and fourth vertices as its corners.
In[10]:= Faces[ Tetrahedron ]
Out[10]=
Note that the geometry data for the regular polyhedra is actually found in the standard package Geometry`Polytopes`. All of the functionality of that package is loaded and available to you.
