vrotv |
Table of contents
ProcedureVROTV ( Vector rotation about an axis ) SUBROUTINE VROTV ( V, AXIS, THETA, R ) AbstractRotate a vector about a specified axis vector by a specified angle and return the rotated vector. Required_ReadingROTATION KeywordsROTATION VECTOR DeclarationsIMPLICIT NONE DOUBLE PRECISION V ( 3 ) DOUBLE PRECISION AXIS ( 3 ) DOUBLE PRECISION THETA DOUBLE PRECISION R ( 3 ) Brief_I/OVARIABLE 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_InputV 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_OutputR is the result of rotating V about AXIS by THETA. If AXIS is the zero vector, R = V. ParametersNone. ExceptionsError free. 1) If the input axis is the zero vector, R will be returned as V. FilesNone. ParticularsThis 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. ExamplesIf 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 ) RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) H.A. Neilan (JPL) W.L. Taber (JPL) VersionSPICELIB 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