MAMBO logo MAMBO & the MAMBO Toolbox MAMBO logo

MakeRotations — Generating a rotation matrix [maple]

MakeRotations(erms)

MakeRotations([erms1], ..., [ermsn])

MakeRotations(rm)

erms,erms1, ..., ermsn: elementary rotation-matrix specifications

rm: rotation matrix

The function MakeRotations returns a rotation matrix as specified by its arguments.

An elementary rotation-matrix specification comes in one of two forms, namely
phi,i
where phi is an algebraic expression and i equals 1, 2, or 3. This corresponds to a rotation by an angle phi about the i-th basis vector.
phi,v1,v2,v3
where phi, v1, v2, and v3 are algebraic expressions. This corresponds to a rotation by an angle phi about the vector whose coordinates equal v1, v2, and v3.
When invoked with multiple elementary rotation-matrix specifications, the MakeRotations procedure returns the matrix product of the individual rotation matrices specified by each of the elementary rotation-matrix specifications.

>MakeRotations(phi,1);

1000cosphisinphi0sinphicosphi

>MakeRotations([phi,2],[theta,1,1,0]);

cosphi12costheta+1212sinphisintheta2cosphi1212costheta+12sinphisintheta212cosphisintheta2+sinphicostheta1212costheta12costheta+1212sintheta2sinphi12costheta+1212cosphisintheta2sinphi1212costheta+12cosphisintheta212sinphisintheta2+cosphicostheta


Toolbox functions