Jump to content
  • Advertisement
Sign in to follow this  
hellovn

How to adapt quaternion to control point

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!