# Rotatable 3D Spikey

**URL:** <https://community.wolfram.com/t/rotatable-3d-spikey/387>\
**Category:** Questions\
**Tags:** fun-and-play, computational-arts, graphics-and-visualization, interface-construction\
**Created:** [August 15, 2013, 3:22pm UTC](https://community.wolfram.com/t/rotatable-3d-spikey/387 "2013-08-15T15:22:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![irfanm](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/irfanm/32/13889_2.png) [@irfanm](https://community.wolfram.com/u/irfanm)\
**Post date:** [August 15, 2013, 3:22pm UTC](https://community.wolfram.com/t/rotatable-3d-spikey/387/1 "2013-08-15T15:22:16Z")

</div>

Hello,

I found many spikeys whose shape changes with Manipulate on the demonstrations page, but I am looking to create a spikey whose shape does not change, but is rotatable.

For example there would be 4 sliders, one would rotate the spikey left-to-right, one would rotate the spikey right-to-left, one from top-to-bottom, and one from bottom-to-top.

The spikey can be any type of spikey that is 3-D.

I would greatly appreciate any and all help in acheiving this!

Thanks in Advance & Best Regards!

---

<div class="post-metadata">

**Author:** ![pngo](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/pngo/32/40460_2.png) [@pngo](https://community.wolfram.com/u/pngo)\
**Post date:** [August 15, 2013, 3:50pm UTC](https://community.wolfram.com/t/rotatable-3d-spikey/387/2 "2013-08-15T15:50:01Z")

</div>

I just posted about how to do something similar to this using the gyrometer in a [Sphero](https://wolfram.discourse.group/t/383/1) robot (see the linked notebook), but I think this is similar to what you want.

```auto
Manipulate[Dynamic[Graphics3D[{Yellow, Opacity[.8],
    Rotate[
     Rotate[
      Rotate[
       PolyhedronData["Spikey", "Faces"],
       roll, {0, 1, 0}],
      pitch, {1, 0, 0}],
     yaw, {0, 0, 1}]
    }]], {roll, 0, 2 Pi}, {pitch, 0, 2 Pi}, {yaw, 0, 2 Pi}]

```

---

<div class="post-metadata">

**Author:** ![irfanm](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/irfanm/32/13889_2.png) [@irfanm](https://community.wolfram.com/u/irfanm)\
**Post date:** [August 15, 2013, 4:54pm UTC](https://community.wolfram.com/t/rotatable-3d-spikey/387/3 "2013-08-15T16:54:47Z")

</div>

Thank you, this is exactly what I was looking for!

---

<div class="post-metadata">

**Author:** ![Vitaliyk](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/vitaliyk/32/45591_2.png) [@Vitaliyk](https://community.wolfram.com/u/Vitaliyk)\
**Post date:** [August 15, 2013, 5:54pm UTC](https://community.wolfram.com/t/rotatable-3d-spikey/387/4 "2013-08-15T17:54:26Z")

</div>

A very nice answer from Phil! But I am just curious, - one can rotate 3D objects in Mathematica with mouse in arbitrary directions - like seen below. Why would you need sliders? - are you trying to stress specific directions of rotation?

```auto
PolyhedronData["Spikey"]

```

![spk.gif](https://global.discourse-cdn.com/wolfram/original/2X/0/09510de0bea493d2c505c375202916809196ab57.gif)

---

<div class="post-metadata">

**Author:** ![irfanm](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/irfanm/32/13889_2.png) [@irfanm](https://community.wolfram.com/u/irfanm)\
**Post date:** [August 15, 2013, 6:50pm UTC](https://community.wolfram.com/t/rotatable-3d-spikey/387/5 "2013-08-15T18:50:30Z")

</div>

Yes, it was a nice answer! Ah, yes. The purpose that I plan on using this, in the web and hopefully without a CDF plugin, requires it to be rotateable. And I thought the sliders may work on the web before the dragging does.

I am trying to stress right / clockwise on the x-z plane rotation. but not disable other rotations.

Is there a way I can get rid of the bounding-box?

---

<div class="post-metadata">

**Author:** ![Vitaliyk](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/vitaliyk/32/45591_2.png) [@Vitaliyk](https://community.wolfram.com/u/Vitaliyk)\
**Post date:** [August 15, 2013, 7:10pm UTC](https://community.wolfram.com/t/rotatable-3d-spikey/387/6 "2013-08-15T19:10:35Z")

</div>

Yes, - **Boxed → False** - adjusting Phil’s code:

```auto
Manipulate[
 Dynamic[Graphics3D[{Yellow, Opacity[.8], 
    Rotate[Rotate[
      Rotate[PolyhedronData["Spikey", "Faces"], roll, {0, 1, 0}], 
      pitch, {1, 0, 0}], yaw, {0, 0, 1}]}, Boxed -> False]], {roll, 0,
   2 Pi}, {pitch, 0, 2 Pi}, {yaw, 0, 2 Pi}]

```

---

<div class="post-metadata">

**Author:** ![irfanm](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/irfanm/32/13889_2.png) [@irfanm](https://community.wolfram.com/u/irfanm)\
**Post date:** [August 15, 2013, 8:01pm UTC](https://community.wolfram.com/t/rotatable-3d-spikey/387/7 "2013-08-15T20:01:04Z")

</div>

Thank you!
