I want to find the geometric equivalent of vector addition and subtraction in 3d for quaternions. In 3d difference between 2 points(a and b) gives the vector from one point to another. (b-a) gives the vector from b to a and when I add this to b I find the point which is double distance from a in the direction of (b-a). I want to do the same thing for unit quaternions but they lie on 4d sphere so direct addition won't work. I want to find the equivalent equation for a-b and a+b where a and b are unit quaternions. It should be something similar to slerp but it is not intuitive to me how to use it here because addition produces a quaternion outside the arc between 2 quaternions.
Find Double of Distance Between 2 Quaternions
-
0Rotation is modeled by *multiplication* of unit quaternions (corresponding to composition of rotations), not addition in $\mathbb{H}$. The addition on the quaternions can only be considered when you're working with the whole thing - a division algebra isomorphic to $\mathbb{R}^4$ as an $\mathbb{R}$-vector space - which does not model rotations as a whole. Therefore it is unclear to me what you *want* to accomplish here. What, in your mind, "should be" the geometric "equivalents" of addition and subtraction on the sphere? – 2012-03-03
1 Answers
Slerp is exactly what you want, except with the interpolation parameter $t$ set to $2$ instead of lying between $0$ and $1$. Slerp is nothing but a constant-speed parametrization of the great circle between two points $a$ and $b$ on a hypersphere, such that $t = 0$ maps to $a$ and $t = 1$ maps to $b$. Setting $t = 2$ will get you the point on the great circle as far from $b$ as $b$ is from $a$. See my other answer to a related question on scaling figures lying in a hypersphere.
Update: Actually, it just occurred to me that this is overkill, though it gives the right answer. The simpler solution is that the quaternion that maps $a$ to $b$ is simply $ba^{-1}$ (this plays the role of "$b-a$"), and applying that quaternion to $b$ gives you $ba^{-1}b$ (analogous to "$(b - a) + b$") which is what you want.
-
0@Alp, please see my update for a simpler solution I just thought of. – 2012-03-04