cross_vectors
- compas.geometry.cross_vectors(u, v)[source]
Compute the cross product of two vectors.
- Parameters:
- u[float, float, float] |
compas.geometry.Vector
XYZ components of the first vector.
- v[float, float, float] |
compas.geometry.Vector
XYZ components of the second vector.
- u[float, float, float] |
- Returns:
- [float, float, float]
The cross product of the two vectors.
Notes
The xyz components of the cross product of two vectors
and can be computed as the minors of the following matrix:Therefore, the cross product can be written as:
Examples
>>> cross_vectors([1.0, 0.0, 0.0], [0.0, 1.0, 0.0]) [0.0, 0.0, 1.0]