2
$\begingroup$

I'd like to create a Graphics3D rendering of a rotated Polyhedron taken from PolyhedronData[]

myGraphic = PolyhedronData[
 "Icosahedron", "Graphics3D"]

I have tried Graphics3D@GeometricTransformation[myGraphic, RotationTransform[Pi/6, {0, 0, 1}, {1, 1, 1}]]

and numerous variations thereon... all without success.

I suspect my problem is a failure to get a Graphics3D object from PolyhedronData[], but cannot be sure.

$\endgroup$
3
$\begingroup$

Try

Graphics3D@Rotate[myGraphic[[1]], Pi/6, {{0, 0, 1}, {1, 1, 1}}]

Notice that you want Rotate to act on the graphics primitive (a GraphicsComplex in this case), not on the whole Graphics3D object.

$\endgroup$
  • $\begingroup$ Oh... so simple (+1). (How did you know that it was the first component of the PolyhedronData?) . [Acceptance in 10 minutes...] $\endgroup$ – David G. Stork Feb 4 at 20:15
  • $\begingroup$ I knew that from experience =) But one can always apply InputForm to Graphics3D objects... $\endgroup$ – Henrik Schumacher Feb 4 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.