News for hackers. Stuff that matters.
Re:Rotations with quaternions by Jyaif on Tuesday June 01, 2021 @10:51AM (#27355265)
Most of the time you don't want to use his SLERP function. You can even see what is wrong in his illustration video: the cube does 3/4s of a full rotation, while only 1/4 of a full rotation would have been sufficient. In other words, it's not always taking the shortest path between 2 rotations.

If you are not careful, this is what you may end up with: https://www.reddit.com/r/FIFA/comments/9gms3n/most_realistic...

Re:Rotations with quaternions by imadr on Tuesday June 01, 2021 @10:58AM (#27355353)
What would be the alternative to slerp that takes the shortest path?
Re:Rotations with quaternions by edflsafoiewq on Tuesday June 01, 2021 @11:42AM (#27356240)
Just replace q2 with -q2 if q1 and q2 are in opposite hemispheres, then slerp.
Re:Rotations with quaternions by imadr on Tuesday June 01, 2021 @02:56PM (#27359546)
If I'm not wrong you check if q1 and q2 are in opposite hemispheres with the sign of their dot product?
Re:Rotations with quaternions by edflsafoiewq on Tuesday June 01, 2021 @05:39PM (#27361696)
Yes.