homogenize_vectors
- compas.geometry.homogenize_vectors(vectors, w=1.0)[source]
Homogenise a list of vectors.
- Parameters:
- vectorssequence[[float, float, float] |
compas.geometry.Vector
] A list of vectors.
- wfloat, optional
Homogenisation parameter.
- vectorssequence[[float, float, float] |
- Returns:
- list[[float, float, float]]
Homogenised vectors.
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.
Examples
>>> vectors = [[1.0, 0.0, 0.0]] >>> homogenize_vectors(vectors) [[1.0, 0.0, 0.0, 1.0]]