函数用于改变观察点
view(az,el)
view([az,el])
view([x,y,z])
view(2)
view(3)
view(ax,...)
[az,el] = view
The position of the viewer (the viewpoint) determines the orientation of the axes. You specify the viewpoint in terms of azimuth and elevation, or by a point in three-dimensional space.
观察者位置的变化决定了坐标轴的方向,你自己可以定义观察点,这个观察点可以是三维空间的一个点也可以是一个方向或者一个高度。说白了就是绕x轴y轴z轴旋转图像。
view(az,el) and view([az,el]) set the viewing angle for a three-dimensional plot. The azimuth,az, is the horizontal rotation about the z-axis as measured in degrees from the negativey-axis. Positive values indicate counterclockwise rotation of the viewpoint. el is the vertical elevation of the viewpoint in degrees. Positive values of elevation correspond to moving above the object; negative values correspond to moving below the object.
az是绕z轴旋转,或者说就是你从正面,侧面,斜侧面看一个物体,单位是角度,正值就代表现在的视角向右,负就是反着。 el是视角的变化,el=0就是从水平方向看,el=90就是垂直往下看。其实就是你趴桌子上看你的水杯和站起来看你的水杯一个道理。只不过el表示的不是高度,也是一个角度值。说成俯视角是不是更好一点。自己领悟吧。
view([x,y,z]) sets the viewpoint to the Cartesian coordinatesx, y, and z. The magnitude of (x,y,z) is ignored.
[x y z]就是你的眼睛在三维空间中的位置
view(2) sets the default two-dimensional view, az = 0,el = 90.
view(3) sets the default three-dimensional view, az = –37.5,el = 30
上面两个函数看后面的az el值就知道啥意思了。.
view(ax,...) uses axes ax instead of the current axes.
[az,el] = view returns the current azimuth and elevation. 返回当前的az el
Examples
View the object from directly overhead.
az = 0; el = 90; view(az, el);
Set the view along the y-axis, with thex-axis extending horizontally and thez-axis extending vertically in the figure.
view([0 0]);
Rotate the view about the z-axis by 180º.
az = 180; el = 90; view(az, el);