Skip to content

novaphy.spatial_cross_force

Spatial cross product motion-on-force. Motion vectors use [linear(3); angular(3)]; force vectors use the matching [force(3); torque(3)] layout.

def spatial_cross_force(v: np.ndarray, f: np.ndarray) -> np.ndarray

Parameters

Parameter Description
v Spatial motion vector, shape (6,): [vx, vy, vz, ωx, ωy, ωz].
f Spatial force vector, shape (6,): [fx, fy, fz, τx, τy, τz].

Returns

The (6,) spatial force vector v ×* f.

Example

import numpy as np
import novaphy

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

Notes

See Also