# How to adapt quaternion to control point

This topic is 3717 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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.

##### Share on other sites
I think you can simply consider the quaternions as 4-dimensional points and interpolate between them. So pi = qi. Does it work?

##### Share on other sites
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.

##### Share on other sites
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.

##### Share on other sites
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.

##### Share on other sites
Multiply every component by the scalar.

1. 1
2. 2
Rutin
21
3. 3
4. 4
A4L
14
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633736
• Total Posts
3013603
×