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

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_VROTV rotates a double precision 3-vector about a specified
   axis vector by a specified angle (measured in radians) then
   returns the rotated vector.

   For important details concerning this module's function, please refer to
   the CSPICE routine vrotv_c.

I/O


   Given:

      v       an arbitrary double precision 3-vector to rotate.

      axis    a double precision 3-vector defining the axis about which
              to rotate 'v'.

      theta   a double precision scalar angle measured in radians through
              which you rotate 'v' about 'axis'.

   the call:

      cspice_vrotv, v, axis, theta, r

   returns:

       r   a double precision 3-vector, the result of rotating 'v' about
           'axis' through an angle of 'theta'.

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.


      ;;
      ;; Given an axis of rotation and an angle of rotation.
      ;;
      axis  = [ 0.d, 0.d, 1.d]
      theta = cspice_pi()/2.d0

      ;;
      ;; Perform rotations on various vectors...
      ;;

   Example(1):

      v1 = [ 1.d, 2.d, 3.d ]
      cspice_vrotv, v1, axis, theta, r1
      print, r1

   IDL outputs:

      -2.0000000    1.0000000      3.0000000


   Example(2):

      v2 = [ 1.d, 0.d, 0.d ]
      cspice_vrotv, v2, axis, theta, r2
      print, r2

   IDL outputs:

      6.1232340e-17  1.0000000      0.0000000


   Example(3):

      v3 = [ 0.d, 1.d, 0.d ]
      cspice_vrotv, v3, axis, theta, r3
      print, r3

   IDL outputs:

      -1.0000000     6.1232340e-17  0.0000000

   Where 6.1232340e-17 equates to 0.d with regards to double precision
   round-off.

Particulars


   None.

Required Reading


   ICY.REQ
   ROTATION.REQ

Version


   -Icy Version 1.0.3, 13-JUN-2011, EDW (JPL)

      Edits to comply with NAIF standard for Icy headers.

   -Icy Version 1.0.2, 13-JUN-2010, EDW (JPL)

      Minor edit to code comments eliminating typo.

   -Icy Version 1.0.1, 17-APR-2008, EDW (JPL)

      Clean-up edits to header.

   -Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)

Index_Entries


   vector rotation about an axis




Wed Apr  5 17:58:04 2017