Quaternions are a way to represent a rotation. All the imaginary number stuff is true, but you don’t really need to understand that to know what it’s used for.
So In video games, they get used to keep track of what direction things are facing. So let’s say you spawn in a gun. It’ll come in a default orientation. Now let’s say you want to put the gun on a gun rack. A quaternion is what’s used to keep track of how the gun has rotated from that initial position.
This technically isn’t a quaternion, but you can think about it like this. Imagine a line coming out of an object (let’s use that video game gun from earlier) at some angle. now rotate the gun around that line by 20 degrees as an example. For any orientation that you want, you can find that axis and angle like this. When people talk about the imaginary and real component for a quarternion, the imaginary part correlates to that axis and the real part corresponds to the rotation. Although technically this is a different thing.
Quaternions can be pretty tricky to understand, but they have some really useful properties so they get used a lot.
Latest Answers