PETZOLD BOOK BLOG
Recent Entries | ||
< Previous | Browse the Archives | Next > |
Subscribe to the RSS Feed |
July 25, 2006
Roscoe, NY
When I first began exploring the 3D classes in the WPF, I was startled to see a class named Quaternion. I had come across quaternions in my readings in 19th century mathematics and science, but I thought they had been superseded by vectors and were now obsolete. I knew there had been a controversy about quaternions, and that William Thomson (Lord Kelvin) hated them and William Guthrie Tait loved them, and that Thomson banned quaternions from the famous collaboration between Thomson and Tait entitled A Treatise on Natural Philsophy. But that was about it.
Of course, I knew all about vectors. I'm pretty sure I first encountered vectors in high school, and they frequently turned up in the math, science, and engineering courses of my college years, but I don't think I ever heard a teacher utter the word "quaternion." And yet, judging by their appearance in the 3D classes, quaternions were evidently still useful. Were they making a resurgence of sorts?
I realized I didn't know the full story about quaternions and vectors, and so I eagerly plunged into A History of Vector Analysis: The Evolution of the Idea of the Vectorial System by Michael J. Crowe (Notre Dame Press, 1967; Dover Press, 1985, 1994).
The idea of a "directed magnitude" had been kicking around since the Ancient Greeks, and had acquired more of an urgency since Newton's Principia (1687) discussed interactions between forces and velocities in various directions. But by the early years of the 19th century, nobody had taken that concept and developed an algebra around it.
The impetus came from a different direction: The complex plane — in which horizontal coordinates represent real numbers and vertical coordinates represent imaginary numbers — has a very wonderful characteristic in that points can be represented as complex numbers, and rotations of points around the origin can be calculated as multiplications by e^{iθ} where θ is the angle of rotation.
Several mathematicians attempted to extend that concept into three dimensions, and on October 16, 1843, Irish mathematician Sir William Rowan Hamilton (1805-1865) had a breakthrough. He devised three "hypercomplex" values called i, j, and k that each seems to behave like the imaginary number i — that is, when multiplied by itself equals -1 — but which are not equal. Hamilton was on a walk when he made this breakthrough, and so he wouldn't forget, used a knife to carve the following formula into the stone of a bridge:
You can imagine i, j, and k as the units of the three axes of a three-dimensional coordinate system, so that multiplying any two yields the third:
These can be derived from the formula above. However, multiplication is not commutative, so that:
The quaternion itself is based on these three hypercomplex numbers. It is an analog of a complex number in four dimensions:
where w, x, y, and z are real numbers. The quaternion has a scalar part (w) and a three-dimensional vector part (the rest).
Hamilton spent the last 22 years of his life promoting quaternions and acquired some followers (Peter Guthrie Tait in particular), but physicists found them of limited use. James Clerk Maxwell used quaternions in a limited, rather unorthodox manner in his influential Treatise on Electricity and Magnetism (1873), which suggested to some readers that quaternions were more useful without the scalar part.
Independently, American mathematician Josiah Willard Gibbs (1839-1903) and English engineer Oliver Heaviside (1850-1925) both developed vector systems that they felt were more useful than quaternions. These systems included the now-familiar dot product and cross product.
Chapter 6 of Crowe's book, "The Struggle for Existence in the 1890's," is devoted to the battles between the advocates of quaternions and vectors that raged in the scientific press (largely in Nature) between 1890 and 1894. For anyone curious about how Victorian scientists and mathematicians called each other "impudent sluts" in print, this chapter alone is worth the $12.95 price of the book.
The first real book about modern vector analysis was published in 1901: Vector Analysis: A Text Book for the Use of Students of Mathematics and Physics Founded upon the Lectures of J. Willard Gibbs by Edwin Bidwell Wilson.
Crowe's book unfortunately ends before the modern resurgence in interest in quaternions. Quaternions are particularly suited in three-dimensional computer graphics for representing rotations. The vector part of the quaternion represents an axis of rotation and the scalar part is an angular rotation around that axis. You can specify the axis and the angle independently, and you can animate one or the other independently (see this 3D animation), but if you're need to animate the axis of rotation and angle together, it's better handled by animating the quaternion.
I suspect I'll have more to say about quaternion animations in the future. Stay tuned.
—Oliver Heaviside as quoted in Crowe, page 171.
(c) Copyright Charles Petzold
www.charlespetzold.com