I'm learning Unity and came across a situation where rotations are represented as Quaternions. I've heard that they where used in computer graphics, but never had to use them until now. What I can't understand is, how do quaternions represents rotations in the three dimensional space?
I know that complex numbers represents rotations in the 2 dimensional space (such as multiplying a number by $i$ would move it by $\frac \pi 2$). This seems logical in the sense that $\Bbb C$ has two unit vectors $i$ and $1$, like the two dimensional space. Why would we need a four dimensional set to represent rotations on a three dimensional space? And what kind of rotation would a quaternion (for example $i+j+k+1$) represent?
Remark:
On the tutorial I'm following to learn Unity, I've used the Quaternion.Euler(float x, float y, float z)
function to create a rotation. From the documentation about the later:
Returns a rotation that rotates z degrees around the z axis, x degrees around the x axis, and y degrees around the y axis (in that order).
Note that the fourth dimension isn't used to define that rotation.
His talk is motivated by CAM (CNC machines) i.e. dynamical system, but a lot of that applies to animation in a virtual reality too. The PH curves that you hear in that talk is his research topic; he also has a book on this. You can mostly ignore those parts. He does explain the basics of quaternions well though, including why you can't have "three-dimensional numbers", how quaternions represent rotations etc. He uses vector algebra for quaternion ops.
– the gods from engineering Mar 04 '15 at 19:16