cspice_rotate

 Abstract I/O Examples Particulars Required Reading Version Index_Entries

#### Abstract

```
CSPICE_ROTATE calculates the 3x3 rotation matrix generated
by a rotation of a specified angle about a specified axis.
This rotation operates as a rotation of the coordinate
system.

```

#### I/O

```
Given:

angle  the rotation angle(s) measured in radians.

[1,1]   = size(angle); double = class(angle)

iaxis  the ID of the axis of rotation. 'iaxis' = 1, 2 or 3
respectively designates the x-, y-, or z-axis.

[1,1]   = size(iaxis); int32 = class(iaxis)

the call:

mout = cspice_rotate( angle, iaxis)

returns:

mout   rotation matrix/matrices that describe a rotation of 'angle'
radians about 'iaxis'

'mout' return with the same vectorization
measure, N, as 'angle'.

```

#### 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.

%
% A Pi/10 rotation about the Z axis.
%
rot_mat = cspice_rotate( 0.1*cspice_pi, 3 )

%
% Apply the coordinate rotation to a vector.
%
vec = [ 1.2; 3.4; 4.5 ];

vec1 = rot_mat * vec

MATLAB outputs:

rot_mat =

0.9511    0.3090         0
-0.3090    0.9511         0
0         0    1.0000

vec1 =

2.1919
2.8628
4.5000

```

```
None.

```

#### Required Reading

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

MICE.REQ
ROTATION.REQ

```

#### Version

```
-Mice Version 1.0.1, 10-MAR-2015, EDW (JPL)

Edited I/O section to conform to NAIF standard for Mice documentation.

-Mice Version 1.0.0, 10-JAN-2006, EDW (JPL)

```

#### Index_Entries

```
generate a rotation matrix

```
`Wed Apr  5 18:00:34 2017`