5,337
edits
Line 37: | Line 37: | ||
There are multiple ways to calculate the distance between two quaternions. See [https://math.stackexchange.com/questions/90081/quaternion-distance Stackexchange]. | There are multiple ways to calculate the distance between two quaternions. See [https://math.stackexchange.com/questions/90081/quaternion-distance Stackexchange]. | ||
* <math>\theta = \cos^{-1}( \langle q_1, q_2 \rangle)</math> | * <math>\theta = \cos^{-1}( \langle q_1, q_2 \rangle)</math> | ||
** Note that this loss can be misleading for rotations because of double cover (<math>R(q_1) = R(-q_1)</math> but <math>\cos^{-1}(x) \neq \cos^{-1}(-x)</math>. Thus some people use the distance below. | |||
* <math>\theta = \cos^{-1}(2 \langle q_1, q_2 \rangle^2 - 1)</math> | * <math>\theta = \cos^{-1}(2 \langle q_1, q_2 \rangle^2 - 1)</math> | ||