basis_vectors_from_matrix
- compas.geometry.basis_vectors_from_matrix(R)[source]
Returns the basis vectors from the rotation matrix R.
- Raises
ValueError – If rotation matrix is invalid.
- Returns
list of two vectors – The X and Y basis vectors of the rotation.
Examples
>>> from compas.geometry import Frame >>> f = Frame([0, 0, 0], [0.68, 0.68, 0.27], [-0.67, 0.73, -0.15]) >>> R = matrix_from_frame(f) >>> xaxis, yaxis = basis_vectors_from_matrix(R)