homogenize_vectors
- compas.geometry.homogenize_vectors(vectors, w=1.0)[source]
Homogenise a list of vectors.
- Parameters
vectors (list) – A list of vectors.
w (float, optional) – Homogenisation parameter. Defaults to
1.0
.
- Returns
list – Homogenised vectors.
Examples
>>> vectors = [[1.0, 0.0, 0.0]] >>> homogenize_vectors(vectors) [[1.0, 0.0, 0.0, 1.0]]
Notes
Vectors described by XYZ components are homogenised by appending a homogenisation parameter to the components, and by dividing each component by that parameter. Homogenisatioon of vectors is often used in relation to transformations.