-2

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.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
user13253
  • 8,666
  • 2
  • 42
  • 65
  • 4
    PolyhedronData["DodecahedronIcosahedronCompound"]//FullForm, you probably need PolyhedronData["DodecahedronIcosahedronCompound", "Faces"] though. – BlacKow Mar 17 '16 at 20:32
  • And I just realized that you asked somewhat similar question that has several answers. – BlacKow Mar 17 '16 at 20:43

1 Answers1

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]

enter image description here

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}]

enter image description here

BlacKow
  • 6,428
  • 18
  • 32