palDeuler palDeuler - Form a rotation matrix from the Euler angles

Description:
A rotation is positive when the reference frame rotates anticlockwise as seen looking towards the origin from the positive region of the specified axis.

The characters of ORDER define which axes the three successive rotations are about. A typical value is 'ZXZ', indicating that RMAT is to become the direction cosine matrix corresponding to rotations of the reference frame through PHI radians about the old Z-axis, followed by THETA radians about the resulting X-axis, then PSI radians about the resulting Z-axis.

The axis names can be any of the following, in any order or combination: X, Y, Z, uppercase or lowercase, 1, 2, 3. Normal axis labelling/numbering conventions apply; the xyz (=123) triad is right-handed. Thus, the 'ZXZ' example given above could be written 'zxz' or '313' (or even 'ZxZ' or '3xZ'). ORDER is terminated by length or by the first unrecognized character.

Fewer than three rotations are acceptable, in which case the later angle arguments are ignored. If all rotations are zero, the identity matrix is produced.


Invocation:
void palDeuler ( const char $*$order, double phi, double theta, double psi, double rmat[3][3] );

Arguments:

order = const char[] (Given)
Specifies about which axes the rotation occurs
phi = double (Given)
1st rotation (radians)
theta = double (Given)
2nd rotation (radians)
psi = double (Given)
3rd rotation (radians)
rmat = double[3][3] (Given & Returned)
Rotation matrix