Tools for 3DGA (g3)

3DGA Tools

Rotation Conversion Methods


Converts a quaternion into a pure rotation rotor


Converts a pure rotation rotor into a quaternion


Converts a quaternion into a rotation matrix


Converts a rotation matrix into a quaternion

Generation Methods


Creates a random unit vector

random_euc_mv([l_max, rng])

Creates a random vector normally distributed with length l_max

generate_rotation_rotor(theta, euc_vector_m, …)

Generates a rotation of angle theta in the m, n plane

random_rotation_rotor([max_angle, rng])

Creates a random rotation rotor


angle_between_vectors(v1, v2)

Returns the angle between two conformal vectors


Converts a 3d numpy vector to a 3d GA point


Converts a 3d GA point to a 3d numpy vector

euc_cross_prod(euc_a, euc_b)

Implements the cross product in GA

rotor_vector_to_vector(v1, v2)

Creates a rotor that takes one vector into another

correlation_matrix(u_list, v_list)

Creates a correlation matrix between vector lists

GA_SVD(u_list, v_list)

Does SVD on a pair of GA vectors

rotation_matrix_align_vecs(u_list, v_list)

Returns the rotation matrix that aligns the set of vectors u and v

rotor_align_vecs(u_list, v_list)

Returns the rotation rotor that aligns the set of vectors u and v