Squad
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.
Well, that was a waste of 2 minutes of my life. Now I have to code faster to get 'em back...
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...
[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...
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
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.
"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.
John BlackburneProgrammer, The Pitbull Syndicate
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement