gaitmap.utils.vector_math.find_random_orthogonal#

gaitmap.utils.vector_math.find_random_orthogonal(v: ndarray) ndarray[source]#

Find a unitvector in the orthogonal plane to v.

Parameters:
vvector with shape (3,)

axis ([x, y ,z])

Returns:
vector which is either crossproduct with [0,1,0] or [1,0,0].

Examples

two vectors each of shape (3,)

>>> find_random_orthogonal(np.array([1, 0, 0]))
array([0, 0, 1])