MATLAB Answers


Save 3D figure with rotational view

Asked by Oscar Hartogensis on 10 Mar 2011
Is it possible to save a Matlab 3D plot to an external image format (not *.fig) where the viewer can control the rotation of the image?
On the web you see these examples all the time (using flash or java?); eg:
I am using Matlab 2009a


Sign in to comment.

1 Answer

Answer by Walter Roberson
on 10 Mar 2011

Perhaps save it as VRML.
It appears there is a coordinate adjustment that would have to be made for VRML; see this previous discussion

  1 Comment

Thanks Walter for this suggestion. I tried it out, but unfortunately it did not work for me. This is what I did:
[x,y] = meshgrid(-2:.2:2,-1:.15:1);
z = x .* exp(-x.^2 - y.^2);
[u,v,w] = surfnorm(x,y,z);
To view the output I installed the following browser plugin:

Sign in to comment.