bundles / scipy 1.17.1 / scipy / spatial / transform / _rotation / Slerp
class
scipy.spatial.transform._rotation:Slerp
Signature
class Slerp ( times : ArrayLike , rotations : Rotation ) Members
Summary
Spherical Linear Interpolation of Rotations.
Extended Summary
The interpolation between consecutive rotations is performed as a rotation around a fixed axis with a constant angular velocity [1]. This ensures that the interpolated rotations follow the shortest path between initial and final orientations.
Parameters
times: array_like, shape (N,)Times of the known rotations. At least 2 times must be specified.
rotations: `Rotation` instanceRotations to perform the interpolation between. Must contain N rotations.
Methods
__call__
Notes
This class only supports interpolation of rotations with a single leading dimension.
Examples
from scipy.spatial.transform import Rotation as R from scipy.spatial.transform import Slerp✓
key_rots = R.random(5, random_state=2342345) key_times = [0, 1, 2, 3, 4]✓
slerp = Slerp(key_times, key_rots)
✓times = [0, 0.5, 0.25, 1, 1.5, 2, 2.75, 3, 3.25, 3.60, 4] interp_rots = slerp(times)✓
key_rots.as_euler('xyz', degrees=True)
✗interp_rots.as_euler('xyz', degrees=True)
✗See also
Aliases
-
scipy.spatial.transform.Slerp