Previous | Next --- Slide 21 of 31
Back to Lecture Thumbnails
churchill

Heres a video I found really helpful for learning about quaternions from 3Blue1Brown:

byungjul

In the class, Jim said Quaternions is the relatively better than other methods in several different ways. but what's the reason why people still use other methods, rather than just using Quaternions for everything?

jmccann

@byungjul (Unit-length) quaternions are a convenient representation for rotations, and work well for several tasks we care about in graphics. This doesn't mean that they are the best representation for all tasks; a few places where they don't work well:

• Specification. Axis-angle, Euler angles, and Matrices are all more intuitive to specify (but, conveniently, are all reasonably easy to convert to quaternions as well).

• Transforming long lists of points. If you count operations, you'll see that mat3 * vec3 takes 9 multiplies and 6 adds, while quat * vec3 * quat' takes, um, several more (this is in my notes but I'm not 100% sure I counted everything). So, for rotating a lot of points, it makes more sense to convert a quaternion to a mat3.

• Composing with other transforms. Unit-length quaternions can only store rotations! So if you want to represent the composition of a bunch of rotations, scales, and translations, you're better off converting your quaternion to a matrix (which is pretty easy to do).

In general, it is rare that a particular data structure is the right data structure for all tasks. Indeed, I can think of only one data type for which a correct representation is universally agreed upon (if anyone reads these comments, perhaps they care to hazard a guess).

crabbage

I had used quaternions in Unity before, but didn't understand them, so I'm really excited to be learning them now.

Phlip9

Video is great, thanks a lot.

matticus99

It's possible to extend the quaternion system to even more dimensions (not that we humans can interact with more than 3 dimensions at a time). The most notable after quaternions is called the octonions – a collection of 8 elements with defined properties and rules regarding their multiplication.