### Coordinates of Icosahedron Vertices

If we inscribe a regular icosahedron in the cube [−1, 1]3 the 12 vertices of the icosahedron will be at (±1, ±t, 0) and their even permutations. We solve for t. One edge is from (1, −t, 0) to (1, t, 0) and its length is 2t. Another edge is from (1, t, 0) to (0, 1, t) and its length is √(1 + (1−t)2 + t2). These lengths must be the same and we have
4t2 = 1 + (1−t)2 + t2 or
2t2 + 2t − 2 = 0.
t = (−2 ± √(4 + 16))/4 = ((√5) − 1)/2 = 0.6180339887498949 .

#### Dodecahedron Too

If we inscribe a regular dodecahedron in the same cube we have 12 vertices at (±1, 0, ±u) and its even permutations, along with these eight: (±v, ±v, ±v). We must use the fact that the distance of these two classes of vertex are equidistant from the origin:
3v2 = 1 + u2.
As above we must also equate two typical edge lengths: from (1, 0, −u) to (1, 0, u) and from (1, 0, u) to (v, v, v).
4u2 = (1−v)2 + (u−v)2 + v2
4u2 = 1 − 2v + v2 + u2 − 2uv + v2 + v2
3u2 − 3v2 + 2uv + 2v − 1 = 0
Slightly messy:

Alternatively we cannibalize our icosahedron and compute the dodecahedron vertices as the centers of the faces of the icosahedron. That dodecahedron will a bit too small but we then scale it up.

One face has vertex set {(1, −t, 0), (1, t, 0), (t, 0, 1)}. The center of that face is ((t+2)/3, 0, ⅓). Lets skip the ⅓'s and scale down later. We have a face center at (t+2, 0, 1). A neighboring face has vertex set {(1, −t, 0), (1, t, 0), (t, 0, −1)}. The corresponding (scaled up) face center is (t+2, 0, −1). The line between these two icosahedron face centers is an edge of the dual dodecahedron. We want this edge to have a coordinate value 1. We scale by
1/(t+2) = 1/((((√5) − 1)/2)+2) = 2/((√5) + 3) = 2((√5) − 3)/(((√5) − 3)((√5) + 3)) = 2((√5) − 3)/(−4)
= (3 − √5)/2 = 0.3819660112501051 .

With this scaling the dodecahedron vertex at (t+2, 0, 1) moves to (1, 0, (3 − √5)/2) and we learn that u = (3 − √5)/2.

Another neighbor of the first face has vertices at {(0, 1, t), (1, t, 0), (t, 0, 1)}. The scaled up center of that face is at (t+1, t+1, t+1). We see that
v = (t+1)/(t+2) = ((√5) + 1)/((√5) + 3)
=((√5) − 3)((√5) + 1)/((√5) − 3)((√5) + 3)) = (2 − 2√5)/(−4) = ((√5) − 1)/2 = 0.6180339887498949 .

Our large dodecahedron has 12 vertices at (±1, ±(t+2), 0) including even permutations, and 8 more at (±(t+1), ±(t+1), ±(t+1)). The edges are all 2 long.

Scaled down by 1/(t+2) = (3 − √5)/2 we have 12 vertices at (±(3 − √5)/2, ±1, 0) and 8 more at (±t, ±t, ±t) where t=((√5) − 1)/2. The edges are all 3 − √5 long. (u = (3 − √5)/2 and v = t = ((√5) − 1)/2.)

Routine initIcosa puts the coordinates of each vertex of an icosahedron in array q and enumerates the 20 oriented faces in array Q.