pytransform3d.rotations.q_prod_vector

pytransform3d.rotations.q_prod_vector(q, v)[source]

Apply rotation represented by a quaternion to a vector.

We use Hamilton’s quaternion multiplication.

Parameters:
qarray-like, shape (4,)

Unit quaternion to represent rotation: (w, x, y, z)

varray-like, shape (3,)

3d vector

Returns:
warray-like, shape (3,)

3d vector

See also

rotor_apply

The same operation with a different name.