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
cspice_rotmat

Table of contents
Abstract
I/O
Parameters
Examples
Particulars
Exceptions
Files
Restrictions
Required_Reading
Literature_References
Author_and_Institution
Version
Index_Entries


Abstract


   CSPICE_ROTMAT calculates the 3x3 rotation matrix generated by
   a rotation of a specified angle about a specified axis applied
   to a matrix. This rotation is thought of as rotating the
   coordinate system.

I/O


   Given:

      m1       a 3x3 matrix to which a rotation is to be applied.

               help, m1
                  DOUBLE = Array[3,3]

               In matrix algebra, the components of the matrix are relevant in
               one particular coordinate system. Applying cspice_rotmat changes
               the components of `m1' so that they are relevant to a rotated
               coordinate system.

      angle    the angle in radians through which the original coordinate
               system is to be rotated.

               help, angle
                  DOUBLE = Scalar

      iaxis    the index for the axis of the original coordinate system about
               which the rotation by `angle' is to be performed.

               help, iaxis
                  LONG = Scalar

               iaxis = 1,2 or 3 designates the X-, Y- or Z-axis, respectively.

   the call:

      cspice_rotmat, m1, angle, iaxis, mout

   returns:

      mout     the matrix resulting from the application of the specified
               rotation to the input matrix `m1'.

               help, mout
                  DOUBLE = Array[3,3]

               If

                  [angle]
                         iaxis

               denotes the rotation matrix by `angle' radians about `iaxis',
               (refer to the routine cspice_rotate) then `mout' is given by
               the following matrix equation:

                  mout = [angle]      * m1
                                iaxis

Parameters


   None.

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.

   1) Rotate the 3x3 identity matrix by 90 degrees about
      the y axis.

      Example code begins here.


      PRO rotmat_ex1

         ;;
         ;; Create the 3x3 identity matrix.
         ;;
         cspice_ident, ident

         ;;
         ;; Rotate 'ident' by Pi/2 about the Y axis.
         ;;
         cspice_rotmat, ident, cspice_halfpi(), 2, r

         ;;
         ;; Output the resulting matrix.
         ;;
         print, FORMAT='(3F18.12)', r(*,0)
         print, FORMAT='(3F18.12)', r(*,1)
         print, FORMAT='(3F18.12)', r(*,2)

      END


      When this program was executed on a Mac/Intel/IDL8.x/64-bit
      platform, the output was:


          0.000000000000    0.000000000000   -1.000000000000
          0.000000000000    1.000000000000    0.000000000000
          1.000000000000    0.000000000000    0.000000000000


Particulars


   The call has the effect of:

      cspice_rotate, angle, iaxis, r
      cspice_mxm, r, m1, mout

Exceptions


   1)  If the axis index is not in the range 1 to 3, it will be
       treated the same as that integer 1, 2, or 3 that is congruent
       to it mod 3.

   2)  If any of the input arguments, `m1', `angle' or `iaxis', is
       undefined, an error is signaled by the IDL error handling
       system.

   3)  If any of the input arguments, `m1', `angle' or `iaxis', is
       not of the expected type, or it does not have the expected
       dimensions and size, an error is signaled by the Icy
       interface.

   4)  If the output argument `mout' is not a named variable, an
       error is signaled by the Icy interface.

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ
   ROTATION.REQ

Literature_References


   None.

Author_and_Institution


   J. Diaz del Rio     (ODC Space)
   E.D. Wright         (JPL)

Version


   -Icy Version 1.0.3, 10-AUG-2021 (JDR)

       Edited the -Examples section to comply with NAIF standard. Added
       example's problem statement and reformatted example's output.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections.

       Removed reference to the routine's corresponding CSPICE header from
       -Abstract section.

       Added arguments' type and size information in the -I/O section.

   -Icy Version 1.0.2, 08-JAN-2008 (EDW)

       Rewrote the -I/O descriptions. The 1.0.1 version of this file
       lacked complete descriptions of the arguments. Included functional
       example code.

   -Icy Version 1.0.1, 09-DEC-2005 (EDW)

       Added -Examples section.

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

Index_Entries


   rotate a matrix



Fri Dec 31 18:43:07 2021