Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When do I need to use quaternions?

Tags:

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?

like image 623
peter.murray.rust Avatar asked Dec 03 '09 14:12

peter.murray.rust


People also ask

Why do we need quaternions?

Rotation and orientation quaternions have applications in computer graphics, computer vision, robotics, navigation, molecular dynamics, flight dynamics, orbital mechanics of satellites, and crystallographic texture analysis.

What is the benefit of using quaternions instead of Eulerian angles?

The motivation for using quaternions is the data stability, considering that the rotation using Euler angles can present more errors and the occurrence of Gimbal Lock [12, 13].

Are quaternions better than Euler angles?

Quaternions are absolutely more accurate. There is a problem called Gimbal lock which was found in Euler angles. It happens when two axis align together. On the other hand quaternions are more flexible and solved this problem as it is more axis oriented.

Why are quaternions used in 3D?

Quaternions are an alternate way to describe orientation or rotations in 3D space using an ordered set of four numbers. They have the ability to uniquely describe any three-dimensional rotation about an arbitrary axis and do not suffer from gimbal lock.


1 Answers

They have a smaller memory footprint than rotation matrices and they are more efficient than both matrix and angle/axis representations.

Also:

  • It's extremely easy to interpolate between two quaternions, which is useful for smooth camera movements etc.
  • Unit normalisation of floating point quaternions suffers from fewer rounding defects than matrix representations.
like image 96
JoeG Avatar answered Sep 28 '22 06:09

JoeG