4

Are there any export formats which preserve the ability to interact with 3D Graphics? (In particular, the ability to rotate.)

EDIT: I've found this question: How to make a 3D plot auto-rotate? which produces an object with head DynamicModule. Can I export as an animated gif or QuickTime movie?

stopple
  • 1,141
  • 1
  • 12
  • 19
  • 2
    I guess it depends on the software you would use to rotate it after the export. – Öskå Aug 11 '14 at 17:29
  • 1
    Save your notebook as a CDF file and download the free CDF player to view and rotate? http://www.wolfram.com/cdf-player/ – Bill Aug 11 '14 at 18:30
  • Take a look here. – Öskå Aug 11 '14 at 19:07
  • I don't think this is a duplicate since the OP specifically asks for an export format that "preserves the ability to interact with 3D Graphics" and then settles for a non-interactive animated gif/movie. I am not clear on what is being asked here. – bobthechemist Aug 12 '14 at 01:57
  • @stopple Why is the CDF format not desirable? All the other suggestions pale in comparison with what you can do with CDF. – Edmund Jul 25 '15 at 13:12

3 Answers3

6

First let's take a 3D element:

g = PolyhedronData["Spikey"];

Mathematica graphics

  • Export as GIF:

    As stated here one can Export a List of images as a GIF:

    animation = Table[Show[g, Boxed -> False, 
      ViewVector -> {0, 5 Cos@u, 5 Sin@u}], {u, 0, Pi, Pi/20}];
    Export["~/animated.gif", animation, "DisplayDurations" -> .1]
    

    giving:

    enter image description here


But since the question is "Are there any export formats which preserve the ability to interact with 3D Graphics? (In particular, the ability to rotate.)" I propose the following which I find very interesting:

  • Export as STL:

    Export["~/Spikey.stl", g];
    

Then one can use Sketchfab to visualize it and get the ability to easily interact with it (click for the full ~3MB GIF):

enter image description here

Glorfindel
  • 547
  • 1
  • 8
  • 14
Öskå
  • 8,587
  • 4
  • 30
  • 49
1

Partly a response, You can work with Interactive Manipulation (just hit F1 and search for it) as well with Import and Export Animations (you know F1).

m = Manipulate[Plot3D[Sin[x y + a], {x, 0, 6}, {y, 0, 6}], {a, 0, 4}]

Export["manipulate1.avi", %]

Works fine on Mac OS X x86 (64-bit) internals will translate "avi" to "mov".

enter image description here

1

Possibly you are looking for something like LiveGraphics3D, a Java applet for interactive rotation of 3D graphics. Three different summaries:

Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371
  • Cannot download applet from Mr Kraus' homepage. The Mathworld link does not seem to work with Safari 11.0.1 even if I allow the Java plugin everywhere: no animation is visible. :-( – András Aszódi Jun 13 '18 at 09:21
  • @LaryxDecidua I'm sorry to say that LiveGraphics3D appears to be an abandoned product. The Mathworld example isn't working for me either at this point, but I get a message that it is blocked so I should at least try to figure out how to unblock it. Nevertheless I don't think this will be of much use any more, even though it was once a nice solution. – Mr.Wizard Jun 13 '18 at 14:53