pytransform3d.transformations.vectors_to_directions

pytransform3d.transformations.vectors_to_directions(V)[source]

Convert 3D vectors to directions.

A direction (x, y, z) given by the components of a vector will be represented by [x, y, z, 0] in homogeneous coordinates to which we can apply a transformation.

Parameters:
Varray-like, shape (n_directions, 3)

Each row is a 3D vector that contains x, y, and z

Returns:
Parray-like, shape (n_directions, 4)

Each row is a direction vector with 0 as last element