Setting Viewpoint with Azimuth, Elevation, and distance

조회 수: 4 (최근 30일)
viet le
viet le 2016년 12월 13일
댓글: Yung-Hsiang Chen 2017년 1월 20일
Hello everyone. I have a problem need your help.
I would like to viewpoint from any position (phi=0:360, and theta=90:0), but the distance from centre to the viewpoint is exactly 100 cm.
I saw command view(az,el) but it is not included distance.
Do you have any solution for this problem. Thank in advance.
  댓글 수: 1
Yung-Hsiang Chen
Yung-Hsiang Chen 2017년 1월 20일
With the view command, you can query and set the current perspective, and with the xlim, ylim, and zlim command, you can query and set the current zoom.
For example
[az,el] = view; %# queries the perspective view(az,el); %# sets the perspective
xl = xlim; %# queries the x-axis limits xlim(xl); %# sets the x-axis limits Alternatively, you can modify the XData, YData, ZData and possibly CData properties of your plot objects when you are updating plots in a sequence. This will be faster than recreating the figure, axes, and objects at each iteration.

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

채택된 답변

Massimo Zanetti
Massimo Zanetti 2016년 12월 13일
Hi Viet, in order to control visualization in the current axes, consider these parameters also:
CameraPosition
CameraPositionMode
CameraTarget
CameraTargetMode
CameraUpVector
CameraUpVectorMode
CameraViewAngle
CameraViewAngleMode
and set them to your needs. You can get the full list of available parameters of the current axes by typing gca in the command line.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by