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?

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.)