1

I'm trying to build a 20 sided die in Actionscript 3, like one in the picture. I figure the best way would be to make it out of 20 equilateral triangles rotated in 3D space. The vertices of the icosahedron's dual dodecahedron would be the centroids of each triangle. But the hard part is figuring out the x,y, and z coordinates for each triangle's centroid and the triangle's 3D rotation about that centroid. If I wanted the center to be 0,0,0 how could I figure out all those coordinates and rotations for triangles with an edge length of s?

dice

1 Answers1

2

A nice description of the vertices of a regular icosahedron centred at the origin is: \begin{align*} (0,\phantom{-}1,\phantom{-}a) && (\phantom{-}a,0,\phantom{-}1) && (\phantom{-}1,\phantom{-}a,0) && (0,\phantom{-}1,-a) && (-a,0,\phantom{-}1) && (\phantom{-}1,-a,0) \\ (0,-1,-a) && (-a,0,-1) && (-1,-a,0) && (0,-1,\phantom{-}a) && (\phantom{-}a,0,-1) && (-1,\phantom{-}a,0) \end{align*} where $a = \frac12(\sqrt5-1)$.

(In short: $(0,0,1)\pm(a,0,0)$, together with their cyclic permutations, and the negatives of those.)

  • The reason why I want to use the dual dodecahedron vertices instead is so I can use each equilateral triangle's centroid as it's origin when I rotate it. If I used the icosahedron vertices, I would have to use one of the triangle's vertices as its origin. From http://en.wikipedia.org/wiki/Dodecahedron, these are the dodecahedron vertices.

    (±1, ±1, ±1) (0, ±1/φ, ±φ) (±1/φ, ±φ, 0) (±φ, 0, ±1/φ)

    Now I need to figure out how to rotate each triangle about its centroid so that it is perpendicular to its position vector.

    – BladePoint Dec 20 '13 at 16:35
  • Maybe I misunderstood the task. I thought you wanted to describe an icosahedron to a computer. With the vertices listed, that task is pretty much done. (If you need to tell the computer which triples make triangles, then there's a bit more work to do figuring out which go with which, but that's not hard.) Is there something else you're trying to do that I've missed? –  Dec 20 '13 at 17:49
  • I've actually made the icosahedron once already using its vertices, but had some problems. There were tiny gaps where the triangles meet due to rounding errors I suppose, and for each triangle I have to define an additional point for its centroid to place the face number. I figured building it out of the dual dodecahedron might fix both issues. – BladePoint Dec 20 '13 at 18:20
  • As I understand it, rounding issues arise from computation, so to avoid them, maybe don't compute anything; just specify the numbers as constants and re-use them in the coordinates of different points. (If your 3d software can't draw two triangles without a gap when they share an edge, more math is not going to help.) As for the centroid, I guess I don't see the problem — if you don't want to store the point, you can easily compute it when needed as the average of the vertices, can't you? –  Dec 20 '13 at 18:42