orthonormalize_vectors

compas.geometry.orthonormalize_vectors(vectors)[source]

Orthonormalize a set of vectors.

Parameters

vectors (list of list) – The set of vectors to othonormalize.

Returns

basis (list of list) – An othonormal basis for the input vectors.

Notes

This creates a basis for the range (column space) of the matrix A.T, with A = vectors.

Orthonormalisation is according to the Gram-Schmidt process.

Examples

>>> orthonormalize_vectors([[1.0, 0.0, 0.0], [1.0, 1.0, 0.0], [0.0, 0.0, 1.0]])
[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]