rotate - Maple Help

Online Help

All Products    Maple    MapleSim


plottools

  

rotate

  

rotate PLOT and PLOT3D data structures

 

Calling Sequence

Parameters

Description

Examples

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.

• 

Several commands in the plottools package can transform plots. For a list, see the plottools help page.  The plots[changecoords] and plots[display] commands can also be used to transform plots.

Examples

withplottools:

withplots:

pplotsinx,x,x=0..2π:

rrotatep,π3:

displayp,r

pplot3d1.3xsiny,x,y,x=1..2π,y=0..π:

rrotatep,π,π2,π:

displayp,r,axes=frame,orientation=120,50,style=patchnogrid

displayrotatehyperbola0,0,0.5,0.5,1..1,π4,color=red

r0sphere3,0,0,1,grid=25,25:

aπ4:c1:

whileevalfa2π<0dorcrotater0&comma;a&comma;0&comma;0&comma;0&comma;0&comma;0&comma;1;aa+π4;cc+1enddo&colon;displayseqri&comma;i=0..c1&comma;scaling=constrained&comma;style=hidden&comma;lightmodel=light4&comma;orientation=10&comma;125&comma;shading=zhue

See Also

convert/radians

plot

plot/structure

plot3d

plot3d/structure

plots[changecoords]

plots[display]

plottools[hyperbola]

plottools[sphere]

while