rotation_matrix_to_axis#
- static Quaternion.rotation_matrix_to_axis(rotation_matrix)#
Convert a rotation matrix to the corresponding axis of rotation. Parameters ———- rotation_matrix : tuple of tuples or list of lists
A 3x3 rotation matrix defined as a tuple of tuples or a list of lists. The matrix should be orthogonal.
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)