# What the idea is behind a quaternion and why do developers prefer them for graphical design?

30 views
0

I have a high level understanding of the mathematics and concepts but I want a _true_ eli5.

In: 8 Quaternions are immune to [gimbal lock](https://en.wikipedia.org/wiki/Gimbal_lock), which is when you get yourself into a situation where you can’t rotate something in the direction you want directly without first rotating it out of a specific problematic angle, so they are excellent for 3D engines that want to avoid fuckyness when handling rotation. You can optionally have a bunch of convenience functions to convert to/from Euler angles and create rotation matrices (quaternions) from Euler angle rotation vectors (x, y, z angles), but the actual data representation will be quaternions. Rotations in 3D can be represented by certain matrices (usually 3×3), or by quaternions. The latter are usually much simpler to handle, as the multiplication rules are much simpler.

In the end, they are fully equivalent. 