Previous: matxdm Up: ../plot79_m.html Next: matxid


MATXEU

       SUBROUTINE  MATXEU (E1,E2,E3)
 C$    (Transform -- Euler Angles)
 C$    Compute a rotation matrix (T = R1*R2*R3) defined by 3 Euler
 C$    angles, and right multiply the stored transformation matrix
 C$    with it.
 C$
 C$    MATXSM() sets  the  stored  matrix  to  a  starting  value,
 C$    MATXIM() inquires the current  value, and MATXIO()  selects
 C$    printing of intermediate matrices.
 C$
 C$    Euler angles have  several definitions  in the  literature,
 C$    and the one used here is taken from the well-known book  by
 C$    Herbert Goldstein,  "Classical  Mechanics",  Addison-Wesley
 C$    (1950).
 C$
 C$    The arguments are:
 C$
 C$    E1,E2,E3.......Euler  angles (degrees) of  rotation.  These
 C$                   are usually  called  (phi,  theta,  psi)  or
 C$                   (alpha, beta, gamma)  by most authors.   The
 C$                   angles  E1  and  E2  are  identical  to  the
 C$                   spherical polar  coordinate angles  phi  and
 C$                   theta.
 C$
 C$    The rotations are made in  three steps to get from  (x,y,z)
 C$    coordinates  to  (x',y',z')  coordinates  in  the   rotated
 C$    system.   The  coordinate  systems  are  RIGHT-HANDED,  and
 C$    POSITIVE rotations about an axis are COUNTERCLOCKWISE  when
 C$    viewed down  the  POSITIVE  part of  the  axis  toward  the
 C$    origin.
 C$
 C$    In the first  step, a rotation  in the X-Y  plane by E1  is
 C$    made about the Z axis, transforming the (x,y,z) system into
 C$    (x1,y1,z).
 C$
 C$    In the second step, a rotation  in the Y1-Z plane by E2  is
 C$    made  about  the  X1  axis,  transforming  (x1,y1,z)   into
 C$    (x1,y2,z1).
 C$
 C$    In the third and final step, a rotation in the X1-Y2  plane
 C$    by E3 is  made about the  Z1 axis, transforming  (x1,y2,z1)
 C$    into (x3,y3,z1) = (x',y',z').
 C$
 C$    Since rotation matrices are orthogonal (i.e. T(transpose) =
 C$    T(inverse)), the inverse relation is given by
 C$
 C$    (x,y,z,h) = (x',y',z',h')T(transpose)
 C$
 C$    Some examples are:
 C$
 C$     E1  E2  E3     ( x'  y'  z' h')
 C$    =============   ================
 C$      0   0   0     ( x   y   z  h)
 C$     90   0   0     (-y   x   z  h)
 C$      0  90   0     ( x  -z   y  h)
 C$      0   0  90     (-y   x   z  h)  (same as 90 0 0)
 C$    -90   0   0     ( y  -x   z  h)
 C$      0 -90   0     ( x   z  -y  h)
 C$      0   0 -90     ( y  -x   z  h)  (same as -90 0 0)
 C$    =============   ================
 C$
 C$    (08-FEB-90)