# mixing more than two vectors

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

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

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 9
• 11
• 9
• 9
• ### Forum Statistics

• Total Topics
634131
• Total Posts
3015728
×