CSPICE_RAXISA computes the axis of the rotation given by an input matrix
and the angle of the rotation about that axis.
Given:
matrix rotation matrix that gives the transformation from
some frame "frame1" to another frame "frame2".
[3,3] = size(matrix); double = class(matrix)
the call:
[axis, angle] = cspice_raxisa( matrix )
returns:
axis the unit vector pointing along the axis of the rotation. In
other words, 'axis' is a unit eigenvector of the input matrix,
corresponding to the eigenvalue 1. If the input matrix is
the identity matrix, 'axis' will be the vector (0, 0, 1).
If the input rotation is a rotation by pi radians, both
'axis' and 'axis' may be regarded as the axis of the rotation.
[3,1] = size(axis); double = class(axis)
angle the angle between 'v' and 'matrix'*'v' for any nonzero vector
'v' orthogonal to 'axis'. 'angle' is given in radians.
The angle returned will be in the range from 0 to pi radians.
[1,1] = size(angle); double = class(angle)
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.
Example:
%
% Define an axis and an angle for rotation.
%
axis = [ 1.; 2.; 3. ];
angle = .1 * cspice_twopi;
%
% Determine the rotation matrix.
%
rot_mat = cspice_axisar( axis, angle );
%
% Now calculate the rotation axis and angle based on the
% matrix as input.
%
[ axout, angout ] = cspice_raxisa( rot_mat);
%
% Now input the axout and angout to cspice_axisar to
% compare against the original rotation matrix rot_mat.
%
rot_out = cspice_axisar( axout, angout );
rot_mat  rot_out
MATLAB outputs:
1.0e15 *
0 0.11102230246252 0.05551115123126
0.11102230246252 0 0
0.05551115123126 0.02775557561563 0
The zero matrix accurate to roundoff error. A numerical
demonstration of equality.
None.
For important details concerning this module's function, please refer to
the CSPICE routine raxisa_c.
MICE.REQ
ROTATION.REQ
Mice Version 1.0.2, 09MAR2015, EDW (JPL)
Edited I/O section to conform to NAIF standard for Mice documentation.
Mice Version 1.0.0, 29NOV2005, EDW (JPL)
rotation axis of a matrix
