pytransform3d.rotations.plane_basis_from_normal

pytransform3d.rotations.plane_basis_from_normal(plane_normal)[source]

Compute two basis vectors of a plane from the plane’s normal vector.

Note that there are infinitely many solutions because any rotation of the basis vectors about the normal is also a solution. This function deterministically picks one of the solutions.

The two basis vectors of the plane together with the normal form an orthonormal basis in 3D space and could be used as columns to form a rotation matrix.

Parameters:
plane_normalarray-like, shape (3,)

Plane normal of unit length.

Returns:
x_axisarray, shape (3,)

x-axis of the plane.

y_axisarray, shape (3,)

y-axis of the plane.