MATLAB Function Reference |
rotate(h,direction,alpha)
rotate(...,origin)
rotate(h,direction,alpha)
旋轉物件 h
alpha
度。
direction
is a two- or three-element vector
that describes the axis of rotation in conjunction with the origin.
rotate(...,origin)
s用一個三個元素的向量指定旋轉的圖軸原點。內定的原點為繪圖盒的中心。
你想要旋轉的圖像物件必須為同一圖軸的兒子。物件的資料會被旋轉所改變。這跟 view
及 rotate3d
相反,他們只會改變視角。
旋轉的圖軸由一個原點以及一個相對於原點的點P所定義。P is expressed as the spherical coordinates [theta phi]
, or as Cartesian coordinates.
The
two-element form for direction
specifies the axis direction using the
spherical coordinates [theta phi]
. theta
是 xy 平面上從x軸正向逆時針旋轉的角度。 phi
is the elevation of the
direction vector from the xy plane.
The
three-element form for direction
specifies the axis direction using
Cartesian coordinates. The direction vector is the vector from the origin to
(X,Y,Z).
h = surf(peaks(20));
rotate(h,[1 0 0],180)
h = surf(peaks(20));
zdir = [0 0 1];
center = [10 10 0];
rotate(h,zdir,45,center)
rotate
會改變對應的圖像物件的 Xdata
, Ydata
, 以及Zdata
值。
The axes CameraPosition
, CameraTarget
, CameraUpVector
, CameraViewAngle
rot90 |
|
rotate3d |