1. 16

  2. 2

    I know enough about mathematics to kinda sorta know what a quaternion is and what complex numbers are, etc. I don’t know enough about math to know why one would use them in these sorts of situations instead of tuples/matrices.

    1. 5

      If I had to sum it up (and other folks chime in if I’m wrong):

      • Quaternions take up less space than matrices
      • Quaternions can be interpolated between more easily/quickly
      • Matrices can encode affine (e.g., translation) transforms while quaternions can’t
      • Quaternions can make it harder to end up with gimbal lock (but is still possible if you use them wrong)
      • Renormalizing a quaternion is significantly cheaper than doing the orthonormalization for a rotation matrix
      • Matrices are better supported by graphics APIs (in particular, 4x4 matrices are a core concept in old OpenGL and Direct3D)
    2. 2

      What a great resource! I’ve been bumping against the raw edges of my utter lack of knowledge in this area so it’s always incredibly helpful when someone in the know with a talent for teaching stops and takes the time to ELI5 :)

      1. 2

        Cool post, one could also mention how the wedge product clarifies rotation better than the typical cross product approach, and how the unit quaternions are the same as the basis for ℝ³ ∧ ℝ³.

        1. 1

          Yep! I think Eric Lengyel has a bunch of great information about that and other geometric algebra stuff.

        2. 1

          A good source for how to code with quaternions. A while back I was looking for a source to help me actually understand quaternions on an intuitive level. It took some time but I found this

          Particularly of interest because it is such cutting edge video tech. I really wish more educational videos used this kind of interaction.