PolyhedronData[] gives a nice collection of polyhedra. And calling PolyhedronData["DodecahedronIcosahedronCompound", "Image"] will give you a nice image of a polyhedron entity. But how does one go about finding the actual Wolfram Language code that will draw this image? The reason I need this is that I'd like to tweak that with additional options such as colors, textures, lighting etc and produce something I want.
Asked
Active
Viewed 233 times
-2
J. M.'s missing motivation
- 124,525
- 11
- 401
- 574
user13253
- 8,666
- 2
- 42
- 65
1 Answers
4
So just for illustration purpose, let's color all Dodecahedron parts orange and Icosahedron part blue.
{vert, faceInd} =
PolyhedronData[
"DodecahedronIcosahedronCompound", #] & /@ {"VertexCoordinates",
"FaceIndices"};
orange = Polygon /@ (vert[[#]] & /@ # & /@
Select[faceInd, Length[#] == 5 &]);
blue = Polygon /@ (vert[[#]] & /@ # & /@
Select[faceInd, Length[#] == 3 &]);
Graphics3D[{Orange, orange, Blue, blue}, Boxed -> False]
And for extra fun we can make the Icosahedron spin around.
b[t_] := Rotate[blue, t Degree, {0, 0, 1}];
Animate[
Graphics3D[{Orange, orange, Blue, b[t]}, Boxed -> False], {t, 0, 360,
10}]
BlacKow
- 6,428
- 18
- 32


PolyhedronData["DodecahedronIcosahedronCompound"]//FullForm, you probably needPolyhedronData["DodecahedronIcosahedronCompound", "Faces"]though. – BlacKow Mar 17 '16 at 20:32