Game Development Reference
In-Depth Information
Figure 4-3.
Regular icosahedron
The following Cartesian coordinates define the vertices of an icosahedron with edge-length 2,
centered at the origin,
(0, ±1, ±
ϕ
)
(±1, ±
ϕ
, 0)
(±
ϕ
, 0, ±1)
where
ϕ
= (1+
√
5)/2, which is the golden ratio (also written as
τ
). Note that these vertices
form five sets of three concentric, mutually orthogonal golden rectangles. In the OpenGL
coordinate system, which ranges from [-1, 1] in all axes, the 12 vertices of the icosahedron
are defined as the following:
// Vertex information
float PtData[][3] = {
{0.5f, 0.0380823f, 0.028521f},
{0.182754f, 0.285237f, 0.370816f},
{0.222318f, -0.2413f, 0.38028f},
{0.263663f, -0.410832f, -0.118163f},
{0.249651f, 0.0109279f, -0.435681f},
{0.199647f, 0.441122f, -0.133476f},
{-0.249651f, -0.0109279f, 0.435681f},
{-0.263663f, 0.410832f, 0.118163f},
{-0.199647f, -0.441122f, 0.133476f},
{-0.182754f, -0.285237f, -0.370816f},
{-0.222318f, 0.2413f, -0.38028f},
{-0.5f, -0.0380823f, -0.028521f},
};