fast_forward.linalg_functions module¶
Collection of linear algebra functions mostly related to geometry operations.
- fast_forward.linalg_functions.apply_rotation(vec_to_rotate, rotation_axis, rad_angle)[source]¶
Rotate a vector around an axis by a given angle. .. note:: The rotation axis is a vector of 3 elements.
- fast_forward.linalg_functions.calc_rotation_matrix(quaternion)[source]¶
Translate a quaternion to a rotation matrix.
- fast_forward.linalg_functions.cross_product(A, B)[source]¶
Return the cross product between vectors A & B. Source: http://hyperphysics.phy-astr.gsu.edu/hbase/vvec.html.
Note
On small vectors (i.e. of 3 elements), computing cross products with this functions is faster than np.cross().
- fast_forward.linalg_functions.dihedral_angle(r1, r2, r3)¶
- fast_forward.linalg_functions.u_vect(vect)¶
Compute unit vector of vector.
- fast_forward.linalg_functions.vec2quaternion(vec, theta)[source]¶
Translate a vector of 3 elements and angle theta to a quaternion.
- fast_forward.linalg_functions.vector_angle(v1, v2)¶
Compute the angle between two vectors.