How to adapt quaternion to control point

Started by
4 comments, last by apatriarca 15 years, 6 months ago
Hi All, I am starting with OpenGL and computer animation. I have a lists of data for control points with quaternion value. For example: q0= {s,x,y,z} = {-8.944966e-01 -4.182613e-01 -1.458414e-01 6.052857e-02} Now, I need to use those above data to calculate the extra control points for Bessel-Overhauser spline. For example: I have a general formula with control point pi: t_(i+1/2) = (p_(i+1) - p_i) / u_(i+1) - ui I want to change this formula using quaternion qi (pi->qi). What is the link between qi(quaternion value) and control point pi ? How can I convert from pi to qi ? I hope my explanation make sense? Thank you very much.
Advertisement
I think you can simply consider the quaternions as 4-dimensional points and interpolate between them. So pi = qi. Does it work?
Hi Apatriarca,

Thank you for your reply. If we have pi = qi, how can we add and subtract two quaternion:

For example:

We have p_(i+1) + pi = ?
p_(i+1) - pi = ?

Do we have a general transformation from pi subtraction and addition to qi?

Thank you very much.
Hi, you can use quaternion operations. You add two quaternions as you add two vectors. Note that if you are working with unit quaternions than you can't be sure than the intermediate quaternions are unit quaternions.
Thanks Apatriarca,

It makes sense now :).

One more thing, how about multiply a quaternion with a float number calculation?

For example: 1/6 * qi = ?

Thank you very much.
Multiply every component by the scalar.

This topic is closed to new replies.

Advertisement