scipy.spatial.transform.Rotation.inv#
- Rotation.inv(self)#
Invert this rotation.
Composition of a rotation with its inverse results in an identity transformation.
- Returns:
- inverse
Rotation
instance Object containing inverse of the rotations in the current instance.
- inverse
Examples
>>> from scipy.spatial.transform import Rotation as R >>> import numpy as np
Inverting a single rotation:
>>> p = R.from_euler('z', 45, degrees=True) >>> q = p.inv() >>> q.as_euler('zyx', degrees=True) array([-45., 0., 0.])
Inverting multiple rotations:
>>> p = R.from_rotvec([[0, 0, np.pi/3], [-np.pi/4, 0, 0]]) >>> q = p.inv() >>> q.as_rotvec() array([[-0. , -0. , -1.04719755], [ 0.78539816, -0. , -0. ]])