slaDeuler -


void slaDeuler(order, phi, theta, psi, rmat)


char *order
double phi
double theta
double psi
double ( *rmat


  Form a rotation matrix from the Euler angles - three successive
  rotations about specified Cartesian axes.

  (double precision)


    *order char     specifies about which axes the rotations occur
    phi    double   1st rotation (radians)
    theta  double   2nd rotation (   "   )
    psi    double   3rd rotation (   "   )


    rmat   double[3][3]  rotation matrix

  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 unrecognised character.

  Fewer than three rotations are acceptable, in which case the later
  angle arguments are ignored.  Zero rotations produces a unit rmat.

  P.T.Wallace   Starlink   17 November 1993