## Raytracing polyhedra

Convex polyhedra can easily be defined in POV by using the coordinates of the dual polyhedron to define a set of intersecting planes that define the original polyhedron. The idea is shown below in the illustration of the dodecahedron, which is defined by the vertices of the dual icosahedron.

Here is the POV code required to define the dodecahedron.

#declare phi = (1.0 + sqrt(5.0))/2.0; // golden mean
#declare rad = 1/sqrt(3); // normalization factor to make the radius = 1
#declare rad2 = 1.36/sqrt(2+phi); // scale so the icosahedron points just poke through
#declare dodecahedron =
intersection{
plane {< 1, 0, phi> rad2}
plane {< 1, 0, -phi> rad2}
plane {< phi, 1, 0> rad2}
plane {< -phi, 1, 0> rad2}
plane {< phi, -1, 0> rad2}
plane {< -phi, -1, 0> rad2}
bounded_by{sphere{<0,0,0> 1}}
}

The center of each face of the dodecahedron is located at the vertex of the icosahedron, and the normal vector of the dodecahedron face is parallel to the vector defined by the icosahedron vertex and the center of the icosahedron (the origin). If you look at the clear yellow dodecahedron, you can see the points of the icosahedron poking through.

To define a general polyhedron, first find the coordinates of the dual polyhedron. Next, define the polyhedron as the intersection of planes with normal vectors described by the dual polyhedron vertices. However, if the vertex of the dual polyhedron is located a distance r from the origin, then the plane is located a distance 1/r from the origin. For example, here is the snub dodecahedron, which is defined by the vertices of the dual tricontahedron.

The snub dodecahedron has 60 vertices and is chiral. It provides the most efficient way of evenly spacing 60 points on a sphere with each point identical to every other point.
If you want to learn how to compute the vertices of a regular polyhedra, you may want to consult Zvi Har'El's paper Uniform Solution for Uniform Polyhedra which describes how to find the vertices of regular polyhedra. It also has programs that will find the vertices and plot simple computer images.

#declare snubdodecahedron =
intersection{