Index of Functions: A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 
Index Page
vrotv

Table of contents
Procedure
Abstract
Required_Reading
Keywords
Declarations
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version

Procedure

     VROTV ( Vector rotation about an axis )

     SUBROUTINE VROTV ( V, AXIS, THETA, R )

Abstract

     Rotate a vector about a specified axis vector by a specified
     angle and return the rotated vector.

Required_Reading

     ROTATION

Keywords

     ROTATION
     VECTOR

Declarations

     IMPLICIT NONE

     DOUBLE PRECISION   V    ( 3 )
     DOUBLE PRECISION   AXIS ( 3 )
     DOUBLE PRECISION   THETA
     DOUBLE PRECISION   R    ( 3 )

Brief_I/O

     VARIABLE  I/O  DESCRIPTION
     --------  ---  --------------------------------------------------
     V          I   Vector to be rotated.
     AXIS       I   Axis of the rotation.
     THETA      I   Angle of rotation (radians).
     R          O   Result of rotating V about AXIS by THETA.

Detailed_Input

     V        is a 3-dimensional vector to be rotated.

     AXIS     is the axis about which the rotation is to be
              performed.

     THETA    is the angle through which V is to be rotated about
              AXIS.

Detailed_Output

     R        is the result of rotating V about AXIS by THETA.
              If AXIS is the zero vector, R = V.

Parameters

     None.

Exceptions

     Error free.

     1)  If the input axis is the zero vector, R will be returned
         as V.

Files

     None.

Particulars

     This routine computes the result of rotating (in a right handed
     sense) the vector V about the axis represented by AXIS through
     an angle of THETA radians.

     If W is a unit vector parallel to AXIS, then R is given by:

         R = V + ( 1 - cos(THETA) ) Wx(WxV) + sin(THETA) (WxV)

     where "x" above denotes the vector cross product.

Examples

     If AXIS = ( 0, 0, 1 ) and THETA = PI/2 then the following results
     for R will be obtained

             V                           R
        -------------             ----------------
        ( 1, 2, 3 )                ( -2, 1, 3 )
        ( 1, 0, 0 )                (  0, 1, 0 )
        ( 0, 1, 0 )                ( -1, 0, 0 )


     If AXIS = ( 0, 1, 0 ) and THETA = PI/2 then the following results
     for R will be obtained

             V                           R
        -------------             ----------------
        ( 1, 2, 3 )                (  3, 2, -1 )
        ( 1, 0, 0 )                (  0, 0, -1 )
        ( 0, 1, 0 )                (  0, 1,  0 )


     If AXIS = ( 1, 1, 1 ) and THETA = PI/2 then the following results
     for R will be obtained

             V                                     R
        -----------------------------   -----------------------------
        ( 1.0,     2.0,     3.0     )   ( 2.577.., 0.845.., 2.577.. )
        ( 2.577.., 0.845.., 2.577.. )   ( 3.0      2.0,     1.0     )
        ( 3.0      2.0,     1.0     )   ( 1.422.., 3.154.., 1.422.. )
        ( 1.422.., 3.154.., 1.422.. )   ( 1.0      2.0,     3.0     )

Restrictions

     None.

Literature_References

     None.

Author_and_Institution

     N.J. Bachman       (JPL)
     J. Diaz del Rio    (ODC Space)
     H.A. Neilan        (JPL)
     W.L. Taber         (JPL)

Version

    SPICELIB Version 1.1.0, 06-JUL-2021 (JDR)

        Added IMPLICIT NONE statement.

        Edited the header to comply with NAIF standard. Removed
        unnecessary $Revisions section.

    SPICELIB Version 1.0.2, 05-FEB-2003 (NJB)

        Header examples were corrected.  $Exceptions section
        filled in. Miscellaneous header corrections were made.

    SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)

        Comment section for permuted index source lines was added
        following the header.

    SPICELIB Version 1.0.0, 31-JAN-1990 (WLT) (NJB) (HAN)
Fri Dec 31 18:37:06 2021