rotation_matrix_to_axis#
- static Quaternion.rotation_matrix_to_axis(rotation_matrix)#
Convert a rotation matrix to the corresponding axis of rotation.
- Parameters:
- Returns:
tuple
The X, Y, and Z axes of the rotated frame.
Examples
>>> from ansys.aedt.core.generic.quaternion import Quaternion >>> rotation_matrix = ( ... (0.7071067811865476, 0.0, 0.7071067811865476), ... (0.0, 1.0, 0.0), ... (-0.7071067811865476, 0.0, 0.7071067811865476), ... ) >>> x, y, z = Quaternion.rotation_matrix_to_axis(rotation_matrix) >>> x (0.7071067811865476, 0.0, -0.7071067811865476) >>> y (0.0, 1.0, 0.0) >>> z (-0.7071067811865476, 0.0, 0.7071067811865476)