0
|
11907 Views
|
6 Replies
|
4 Total Likes
View groups...
Share

# Rotatable 3D Spikey

Posted 11 years ago
 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!
6 Replies
Sort By:
Posted 11 years ago
 Thank you!
Posted 11 years ago
 Yes, - Boxed -> False - adjusting Phil's code: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}]
Posted 11 years ago
 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?PolyhedronData["Spikey"]
Posted 11 years ago
 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?
Posted 11 years ago
 Thank you, this is exactly what I was looking for!
Posted 11 years ago
 I just posted about how to do something similar to this using the gyrometer in a Sphero robot (see the linked notebook), but I think this is similar to what you want. 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}]