pytransform3d.rotations.axis_angle_from_two_directions

pytransform3d.rotations.axis_angle_from_two_directions(a, b)[source]

Compute axis-angle representation from two direction vectors.

The rotation will transform direction vector a to direction vector b. The direction vectors don’t have to be normalized as this will be done internally. Note that there is more than one possible solution.

Parameters:
aarray-like, shape (3,)

First direction vector

barray-like, shape (3,)

Second direction vector

Returns:
aarray, shape (4,)

Axis of rotation and rotation angle: (x, y, z, angle). The angle is constrained to [0, pi].

Examples using pytransform3d.rotations.axis_angle_from_two_directions

Axis-Angle Representation from Two Direction Vectors

Axis-Angle Representation from Two Direction Vectors

Axis-Angle Representation from Two Direction Vectors