euler_angles_from_matrix
- compas.geometry.euler_angles_from_matrix(M, static=True, axes='xyz')[source]
Returns Euler angles from the rotation matrix M according to specified axis sequence and type of rotation.
- Parameters
M (list of list of float) – The 3x3 or 4x4 matrix in row-major order.
static (bool, optional) – If true the rotations are applied to a static frame. If not, to a rotational. Defaults to True.
axes (str, optional) – A 3 character string specifying order of the axes. Defaults to ‘xyz’.
- Returns
list of float – The 3 Euler angles.
Examples
>>> ea1 = 1.4, 0.5, 2.3 >>> R = matrix_from_euler_angles(ea1) >>> ea2 = euler_angles_from_matrix(R) >>> allclose(ea1, ea2) True