Impossible Viewpoint using Azimuth and Elevation

二次信任 提交于 2019-12-08 01:38:46

问题


I can't seem to achieve the following 3D plot view orientation using the view([AZ,EL]) command.

No matter how hard I try rotating my 3D plot in the figure using the mouse or the command view itself, I just can't get that viewing angle. Is there another way of specifying the viewpoint?


回答1:


You can achieve these sorts of views using camera control functions, in this case camorbit and camroll:

[X, Y, Z] = peaks();
hAxes = gca;
surf(hAxes, X, Y, Z);
xlabel('x');
ylabel('y');
zlabel('z');
camorbit(-90, 0);
camroll(hAxes, -111);

Notice that positive x is pointing up and to the right, positive z is pointing down and to the right, and positive y is pointing up.

I've done a lot of 3D visualization in MATLAB, and have put together some tools I routinely use for manipulating the view with the mouse. I posted one such tool on the MathWorks File Exchange called MouseManager. One of the demos I included in the submission is an example for how to create mouse-based manipulation of the view (rotating, dollying, and zooming).



来源:https://stackoverflow.com/questions/43479327/impossible-viewpoint-using-azimuth-and-elevation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!