QUAT2ROTAXIS
Name
QUAT2ROTAXIS
Purpose
Returns the net axis and angle of the rotation specified by the
input quaternion.
Category
Math
Calling Sequence
Result = QUAT2ROTAXIS(Quat)
Inputs
Quat: A quaternion specifying a rotation.
Outputs
The function returns a 4-element vector. The first 3 elements are
the axis of the rotation and the 4th element is the
magnitude of the rotation in radians.
Example
IDL> theta=!PI/3.
IDL> rm = [[COS(theta),0,-SIN(theta)],[0,1,0],[SIN(theta),0,COS(theta)]]
IDL> quat = MATRIX2QUATERNION(rm)
IDL> rotation = QUAT2ROTAXIS(quat)
IDL> PRINT, rotation
0.00000 -1.000000 0.00000 1.04720
Modification History
Written by: Jeremy Bailin
27 Nov 2008 Released in JBIU