Monday, January 11, 2016

mathematics - Why do people use quaternions?


I have been using them as a black box for a while, I'm just learning about of the maths but I'd just like some definitive answers to this question.


So far the only benefit I've come across personally is the ability to SLERP between two angles - to achieve the same effect with a vector you need quite an ugly work around (intrinsically linking 0 and 2PI together).



Answer



Quaternions solve a few problems elegantly:




  • They are as compact as axis-angle representations (4 scalar values)

  • They are easily converted to and from matrix representations

  • Interpolation works from any start to end angle without special casing

  • They never exhibit gimbal lock


You can get around these issues with other representations, but quaternions are a good fit for their algorithmic simplicity and performance.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...