Skip to content

novaphy.spatial_cross_motion

Spatial cross product motion-on-motion. Both inputs and the result use NovaPhy's Newton-compatible [linear(3); angular(3)] layout.

def spatial_cross_motion(v: np.ndarray, u: np.ndarray) -> np.ndarray

Parameters

Parameter Description
v Left spatial motion vector, shape (6,): [vx, vy, vz, ωx, ωy, ωz].
u Right spatial motion vector, shape (6,), using the same layout.

Returns

The (6,) spatial motion vector v × u.

Example

import numpy as np
import novaphy

v = np.array([0, 0, 0, 0, 0, 1], dtype=np.float32)  # spin about z
u = np.array([1, 0, 0, 0, 0, 0], dtype=np.float32)  # translate along x
result = novaphy.spatial_cross_motion(v, u)
np.testing.assert_allclose(result, [0, 1, 0, 0, 0, 0], atol=1e-6)

Notes

See Also