|
plottools[rotate] - rotate PLOT and PLOT3D data structures
|
|
Calling Sequence
|
|
rotate(p, ang, pt_2d)
rotate(q,alpha,beta,gamma)
rotate(q,alpha,[pt_3d_1,pt_3d_2])
|
|
|
Parameters
|
|
|
p
|
-
|
PLOT data structure or a 2-D object
|
|
ang
|
-
|
counter-clockwise rotation angle in radians
|
|
pt_2d
|
-
|
(optional) list of 2 real numbers specifying the center of the rotation (for the 2-D case)
|
|
q
|
-
|
PLOT3D data structure or a 3-D object
|
|
alpha
|
-
|
rotation angle around x-axis in radians
|
|
beta
|
-
|
rotation angle around y-axis in radians
|
|
gamma
|
-
|
rotation angle around z-axis in radians
|
|
pt_3d_1, pt_3d_2
|
-
|
(optional) lists of 3 real numbers
|
|
|
|
|
|
Description
|
|
|
•
|
The rotate command takes a plot structure or object and produces a new plot structure or object rotated by the specified angle(s).
|
|
•
|
The inputs p and q must be PLOT and PLOT3D data structures or objects. For 2-D plots and objects, ang represents the counter-clockwise rotation angle.
|
|
•
|
For 3-D plots and objects, the original rectangular coordinate system with x, y, and z-axes is brought into coincidence with a second rectangular coordinate system with the same origin and x1, y1, and z1-axes. This is done by rotating about the x-axis through an angle alpha, then about the y-axis through an angle beta, and finally about the z-axis through an angle gamma. All rotations follow the left-hand rule, that is, if you point your left thumb in the positive direction of the axis, then your fingers curl in the direction of the rotation.
|
|
•
|
If the calling sequence is of the form rotate(q, alpha, [pt_3d_1, pt_3d_2]), then pt_3d_1 and pt_3d_2 define the axis of rotation.
|
|
•
|
The result of a call to rotate is a 2-D or 3-D plot structure or object that can be displayed with the plots[display] command. You can assign the data structure to a variable, save it in a file, then read it for redisplay. For more information about plot data structures, see plot/structure and plot3d/structure.
|
|
|
|
Examples
|
|
|
>
|
|
|
>
|
|
|
>
|
|
|
>
|
|
|
>
|
|
|
>
|
|
|
>
|
|
|
>
|
|
|
>
|
|
|
>
|
|
|
>
|

|
|
>
|
![display([seq(r[i], i = 0 .. c-1)], scaling = constrained, style = hidden, lightmodel = light4, orientation = [10, -125], shading = zhue)](/support/help/helpview.aspx?si=2137/file01137/math256.png)
|
|
|
|
See Also
|
|
convert/radians, plot, plot/structure, plot3d, plot3d/structure, plots[changecoords], plots[display], plottools[hyperbola], plottools[rotate], plottools[sphere], while
|
|