bundles / scipy latest / scipy / spatial / transform / _rigid_transform / RigidTransform / as_dual_quat
function
scipy.spatial.transform._rigid_transform:RigidTransform.as_dual_quat
source: build-install/usr/lib/python3.14/site-packages/scipy/spatial/transform/_rigid_transform.py:1249
Signature
def as_dual_quat(self, *, scalar_first: bool = False) → ArraySummary
Return the dual quaternion representation of the transform.
Extended Summary
Unit dual quaternions encode orientation in a real unit quaternion and translation in a dual quaternion. There is a double cover, i.e., the unit dual quaternions q and -q represent the same transform.
Parameters
scalar_first: bool, optionalWhether the scalar component goes first or last in the two individual quaternions that represent the real and the dual part. Default is False, i.e. the scalar-last order is used.
Returns
dual_quat: numpy.ndarray, shape (..., 8)Unit dual quaternion vectors with the same leading dimensions as the transform. The real part is stored in the first four components and the dual part in the last four components.
Examples
from scipy.spatial.transform import RigidTransform as Tf import numpy as np✓
Tf.identity().as_dual_quat()
✓array([0., 0., 0., 1., 0., 0., 0., 0.])When we want to use the scalar-first convention, we use the argument:
Tf.identity().as_dual_quat(scalar_first=True)
✓array([1., 0., 0., 0., 0., 0., 0., 0.])
Aliases
scipy.spatial.transform.RigidTransform.as_dual_quat