#### Archived

This topic is now archived and is closed to further replies.

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

## Recommended Posts

Squad takes four quaternions. Where do I get the four quaternions from? With slerp there are only two because you go from one spot to another, but why are there four with squad? Anyone know a good article to demystify the squad algorithm? Thanks.

##### Share on other sites
My guess is that you need two more to fully establish the boundary conditions, i.e. the initial and final ''velocities'' of the interpolation, just like with splines.

[Questions (STFW) | GDNet Start Here | GDNet Search | Forum FAQ | Google | Asking Smart Questions ]
[Docs (RTFM) | MSDN | SGI''s STL | OpenGL | File formats]
[C++ Must Haves (RTFS) | MinGW | Boost | Loki | FLTK | SDL ]

Stolen from Magmai Kai Holmlor, who held it from Oluseyi, who was inspired by Kylotan...

##### Share on other sites
From the directx documentation for D3DXQuaternionSquad:

"This function uses the following sequence of spherical linear interpolation operations: Slerp(Slerp(pQ1, pC, t), Slerp(pA, pB, t), 2t(1 - t))"

where the argument order is

pOut, pQ1, pA, pB, pC, t

Try working out what it does as t goes from 0 to 1 to visualise it.

• 11
• 19
• 12
• 9
• 34
• ### Forum Statistics

• Total Topics
631398
• Total Posts
2999840
×