engforge.eng.structure_beams.rotation_matrix_from_vectors

rotation_matrix_from_vectors(vec1, vec2)[source]

Find the rotation matrix that aligns vec1 to vec2 :type vec1: :param vec1: A 3d “source” vector :type vec2: :param vec2: A 3d “destination” vector :return mat: A transform matrix (3x3) which when applied to vec1, aligns it with vec2.