pytransform3d.rotations.rotor_from_two_directions

pytransform3d.rotations.rotor_from_two_directions(v_from, v_to)[source]

Construct the rotor that rotates one vector to another.

Parameters
v_fromarray-like, shape (3,)

Unit vector (will be normalized internally)

v_toarray-like, shape (3,)

Unit vector (will be normalized internally)

Returns
rotorarray, shape (4,)

Rotor: (a, b_yz, b_zx, b_xy)

Examples using pytransform3d.rotations.rotor_from_two_directions