Message Boards Message Boards

Deploy 3D interactivity to the Wolfram cloud?

GROUPS:

Hi,

I have a website that involves a lot of (static) 3D graphics I've created in Mathematica. Is there a way to integrate 3D interactivity with the graphics with the Wolfram cloud? I would prefer to not use a Manipulate to rotate the graphics but rather just use the mouse. Is that possible? Would someone know of a tutorial on line I could read and learn how to do this if so? For example, suppose I had the plot Sin[x y] shown in my website. Could I then have a cloud link that would allow the user to then rotate the plot with the mouse?

Thanks, Dominic

POSTED BY: Dominic Milioto
Answer
2 months ago

Just an update. As a start, I can set up a Manipulate to rotate the graphics in the cloud but there is a lot of delay between moving the slider and rendering the graphics, and the quality of the graphics in the cloud is not as good as in the notebook. Is there a way to improve this?

CloudDeploy[
 Animate[With[{v = RotationTransform[\[Theta], {0, 0, 1}][{3, 0, 3}]},
   Show[Plot3D[Sin[x y], {x, -5, 5}, {y, -5, 5}, PlotRange -> 4, 
     ViewPoint -> v]]], {\[Theta], 0, 2 Pi}, 
  AnimationRunning -> False]]

which gives me the link:

link to cloud

POSTED BY: Dominic Milioto
Answer
2 months ago

Hi guys,

I can simply code:

CloudDeploy[Show[{pbYellowPlot, ptBluePlot, stRedPlot, sbGreenPlot}], Permissions -> {All -> {"Read", "Interact", "Evaluate"}}]

and then connect to that link and get a 3D interactive interface. However when I go to another machine and click on the link, the page loads, the plot displays for a second and then disappears with a small red box at the top of the page. When I place my cursor on the red box I get the message:

"Unable to get property "SameQ" of undefined or null reference".

Can someone help me get this working for all users for example if I want to post a 3D interactive plot to a forum such as Physics Forum:

https://www.physicsforums.com/threads/using-3d-interactivity-in-pf.924530/#post-5835418

POSTED BY: Dominic Milioto
Answer
2 months ago

Hi Dominic,

We do support interaction of 3D graphics in the Wolfram Cloud based on webgl. That means you can rotate, pan, and zoom your 3D object with just a web browser. The initial rendering is an image, when you interact with the graphic it will switch to webgl, and then transition back to an image when interaction is finished.

However, we do not fully support all primitives or options in Graphics3D that the desktop does and in those cases you will only get a static image.

There will be delay in your Manipulate case, because it makes a round trip back to the server when you move the slider.

Are you still having problems deploying 3D content and getting errors with red boxes?

POSTED BY: John Pacey
Answer
10 days ago

Group Abstract Group Abstract