Reputation: 38073
I have been carrying out 2D and 3D operations, including graphics, for many years and have never used quaternions so I don't have a feel for them. I know that they can be used for certain operations that are difficult in Euler angles and also that they can be used to find the rotation required to best fit one set of coordinates (X1, X2...XN, X=(xyz)) onto another (X1', X2'... XN').
Are there places where quaternions are essential? And are there places where they make solutions more elegant or more efficient?
Upvotes: 23
Views: 10852
Reputation: 1918
Pros of quaternions
Cons.
Upvotes: 2
Reputation: 11221
Compared to Euler angles they are simpler to compose and avoid the problem of gimbal lock.
Compared to rotation matrices they are more numerically stable and the representation (4 numbers) is more compact.
Upvotes: 0
Reputation: 13192
They have a smaller memory footprint than rotation matrices and they are more efficient than both matrix and angle/axis representations.
Also:
Upvotes: 19
Reputation: 1634
Quaternions have many advantages over Euler angles and are often preferable for 3D rotations:
Disadvantages:
Upvotes: 5
Reputation: 143905
With quaternions you also handle the problem of the gimbal lock. And they are easier to work with when you want to perform arbitrary rotations.
Upvotes: 3
Reputation: 4992
The advantage of quaternions over matrices is not only faster computation, but mostly because a matrix representation of successive rotations around arbitrary angles eventually give in to dreadful floating-point round-off errors and no longer represent proper, affine rotations. "Restoring" a rotation matrix is computationally more expensive than normalizing a quaternion. Therefore, quaternions should be chosen over pure rotation matrices.
Upvotes: 1