Jump to content
  • Advertisement
Sign in to follow this  
xDan

mixing more than two vectors

This topic is 3807 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

It seems easy enough to interpolate only two vectors. But how do I mix an arbitrary amount of vectors? Each vector would have an interpolation amount between 0.0 and 1.0, which defines how much effect it has on the final result. And is there a method for quaternions?

Share this post


Link to post
Share on other sites
Advertisement
You can always combine an arbitrary number of vectors by linear combination.

If your weights add up to 1 (which is probably your case), what you are doing is computing a barycenter, and this operation can be performed not only on vectors, but on points of an affine space.

Quaternions are vectors, so you can definitely perform those operations. Of course, if your quaternions represent rotations, the result of this operation generally will not represent one (it will be "too short"), so you'll have to normalize it.

[Edited by - alvaro on March 14, 2008 8:40:45 AM]

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!