MadSci Network: Computer Science
Query:

Re: What is a quaterion?

Date: Wed Jan 10 12:37:39 2001
Posted By: Todd Jamison, Staff, Image Science, Observera, Inc.
Area of science: Computer Science
ID: 977463149.Cs
Message:

Quaternions are a mathematical device for performing fast, combined, 
relative rotations (of, for example, ojects or coordinates) in 3D space.  
There are a number of "good" web sites on quaternions:

http://www.cs.berkeley.edu/~laura/cs184/quat/quaternion.html  
http://www.gamasutra.com/features/programming/19980703/quaternions_06.htm
http://sunsite.auc.dk/nl3dp/matrixfaq.php3 
http://info.lut.ac.uk/departments/ma/gallery/quat/intro.html 
http://www.med.uwo.ca/physiology/courses/tweedweb/

Basically, if you are familiar with the complex number system, where i is 
defined as the sqrt(-1), and complex numbers are written in the form a + bi, 
then quaternions are an extension of that concept where there are three 
numbers, i, j, & k, that are each a different square root of -1 and a number 
is represented as a + bi + cj + dk.  Whereas the complex numbers fill a two 
dimensional plane, quaternions fill a 4 dimensional space.  When first 
invented, they were a solution looking for a problem.  Thus, fundamentally, 
quaternions fit into the field of mathematics.  However, it seems that their 
primary use is in computer science for rotating objects.  They also have 
application to physics.

Real world objects have 3 dimensions and, thus, have three dimensions of 
rotational freedom - around each of the 3 axes, for example.  When a set of 
rotation angles (often called Euler angles), for example yaw, pitch and 
roll, are defined for an object, they are relative to the coordinate system 
of the object prior to the given rotation angle being applied.  So roll 
would be applied after yaw and pitch in the example system given.  But there 
are problems with this approach in that some combinations of angles can 
result in not being able to get to another arbitrary angle from the current 
angle.  This is known as gimbal lock.  Quaternions can be used as a device 
for applying relative rotations successively without getting into this 
"gimbal lock" condition.  

Personally, I have tried visualizing how quaternions work, but I can't do 
it.  They work, which can be proved mathematically, but until you take the 
result and put it back into normal coordinates, it doesn't seem to make any 
sense to me.  It seems to be analogous to homogeneous coordinates, which is 
a mathematical device wherein you can add an extra dimension so that you can 
model non-linear vector operations as linear operations.  This is used, for 
example, when modeling camera perspectives in computer graphics.  
Quaternions are also used in computer graphics to allow smooth 
interpolations of angular object motions in 3D.  They are also used in 
simulation.  I have also read a fairly extensive site on the physics 
applications of quaternions in quantum field theory and tensor analysis, but 
it was way over my head.  I am not aware of any relationship to fractals, 
but I wouldn't be surprised as I know that complex fractals (Julian sets, I 
think) are a big field of study, so why not quaternions.  

I hope this gives you the brief intro that you were looking for.  More 
detailed info is available at the sites listed above.  

Good luck, 
Todd Jamison, Chief Scientist, Observera, Inc. http://www.observera.com





Current Queue | Current Queue for Computer Science | Computer Science archives

Try the links in the MadSci Library for more information on Computer Science.



MadSci Home | Information | Search | Random Knowledge Generator | MadSci Archives | Mad Library | MAD Labs | MAD FAQs | Ask a ? | Join Us! | Help Support MadSci


MadSci Network, webadmin@www.madsci.org
© 1995-2001. All rights reserved.