Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question
1  
The standard quaternions $\mathbb H$ are a multiplicative structure on the standard linear space $\mathbb R^4$ -- they are not restricted to a sphere, and are closed under ordinary vector addition and subtraction. Are you thinking of some other kind of quaternions? –  Henning Makholm Mar 3 '12 at 22:43
1  
A discussion about quaternion slerp is available here. Found starting from wikipedia. –  Raymond Manzoni Mar 3 '12 at 22:54
    
@HenningMakholm: I am talking about unit quaternions –  Alp Hancioglu Mar 3 '12 at 22:59
    
Rotation 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? –  anon Mar 3 '12 at 23:20

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
Thanks, it works as you described. –  Alp Hancioglu Mar 4 '12 at 0:09
    
@Alp, please see my update for a simpler solution I just thought of. –  Rahul Mar 4 '12 at 1:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.