Last: mrkr4 Up: ../plot79_m.html Next: mateui
SUBROUTINE MATEU (T,E1,E2,E3)
C$ (Euler Angles)
C$ Compute a rotation matrix (T = R1*R2*R3) defined by 3 Euler
C$ angles. Euler angles have several definitions in the
C$ literature, and the one used here is taken from the
C$ well-known book by Herbert Goldstein, "Classical
C$ Mechanics", Addison-Wesley (1950).
C$
C$ The arguments are:
C$
C$ T(4,4).........Matrix in which rotation is stored. The
C$ transformed coordinates are given by
C$ (x',y',z',h') = (x,y,z,h)T.
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$ (13-MAR-85)