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);

1000cos⁡phi−sin⁡phi0sin⁡phicos⁡phi

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

cos⁡phi⁢12⁢cos⁡theta+12−12⁢sin⁡phi⁢sin⁡theta⁢2cos⁡phi⁢12−12⁢cos⁡theta+12⁢sin⁡phi⁢sin⁡theta⁢212⁢cos⁡phi⁢sin⁡theta⁢2+sin⁡phi⁢cos⁡theta12−12⁢cos⁡theta12⁢cos⁡theta+12−12⁢sin⁡theta⁢2−sin⁡phi⁢12⁢cos⁡theta+12−12⁢cos⁡phi⁢sin⁡theta⁢2−sin⁡phi⁢12−12⁢cos⁡theta+12⁢cos⁡phi⁢sin⁡theta⁢2−12⁢sin⁡phi⁢sin⁡theta⁢2+cos⁡phi⁢cos⁡theta


Toolbox functions