Save 3D figure with rotational view

조회 수: 8 (최근 30일)
Oscar Hartogensis
Oscar Hartogensis 2011년 3월 10일
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: http://www.yofla.com/flash/3d-rotate/flexi/
I am using Matlab 2009a

답변 (1개)

Walter Roberson
Walter Roberson 2011년 3월 10일
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
Oscar Hartogensis
Oscar Hartogensis 2011년 3월 10일
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);
quiver3(x,y,z,u,v,w);
set(gca,'xtick',[],'ytick',[],'ztick',[])
vrml(gca,'test')
To view the output I installed the following browser plugin:
http://www.cortona3d.com/Products/Cortona-3D-Viewer.aspx

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by