## Kinematics with Quaternions

Moderator
Posts: 1,140
Joined: 2005.07
Post: #1
I haven't been able to find any satisfactory pages on Google on this subject, but maybe I wasn't looking correctly. I'm trying to find the equivalent kinematic equations for use with quaternions. If I had to guess, I would think that you take the regular formulas and where you normally multiply a constant, you would instead multiply the angle of the quaternion, and when you'd normally add the components together, you multiply the resulting quaternions. However, does anybody know of any specific information, whether confirmation or information otherwise?
Moderator
Posts: 1,140
Joined: 2005.07
Post: #2
Wow, nobody? I guess I'll just have to pioneer this and see if it works. I'll let you guys know if it does work, in case anybody ever runs into the same situation.
Moderator
Posts: 869
Joined: 2003.01
Post: #3
You should be a bit more specific as to what you want to do. You can do kinematics with quaternions, but you have to doctor the regular matrix/vector equations a bit, though it is quite straight forward. What kind of kinematics do you want anyway? forward? backward? both?
Moderator
Posts: 1,140
Joined: 2005.07
Post: #4
I would like to do both. I have derived some equations to find the accelerations under certain situations, and will be doing step-wise forward kinematics. (for use in animations) I have set it up as I described before, where I scale the angle when normally multiplying by a scalar and multiply quaternions where you normally add vectors. I have also ordered the operations so it goes from lowest to highest order. These are the equations I'm using, with the terms in the order I'm applying them.

stepwise increment of velocity
vf = vi + a*t

stepwise increment of position
d = vf*t

(vf is the result from the previous equation)

Finding the acceleration where it has a set time to go a certain distance, and it accelerates for time t1
a = (d - vi*t)/(t1*t - 1/2*t1^2)

finding 2 accelerations to go to a certain distance in a certain amount of time, then stop at that destination
a2 = (-2*d + vi*t1)/(t1*t2 + t2^2)
a1 = -(vi + a2*t2)/t1

d, vi, vf, a1, a2, and a are all quaternions. t1 + t2 = t. (total time)