pyCGM2.Model.frame.rotationMatrix_TO_quaternion#

pyCGM2.Model.frame.rotationMatrix_TO_quaternion(RotMat: ndarray) ndarray#

Converts a rotation matrix to its quaternion representation.

Algorithm in Ken Shoemake’s article in 1987 SIGGRAPH course notes article “Quaternion Calculus and Fast Animation”.

Parameters:

RotMat (np.ndarray) – A 3x3 rotation matrix.

Returns:

np.ndarray – Quaternion representation of the rotation matrix.