CompuServe Messages

#Quaternions?

    12-Apr-95 11:24:14
Sb: #164210-#Quaternions?
Fm: Jonas Ruikis [ADESK] 73172,1351
To: DAVID CAMP 75242,1207
Hi David, << so I guess I should be able to dazzle them with my knowledge of quaternions.. >>…the following should be a good start..;-} On page 1063 of Computer Graphics Principles and Practice, Second Edition, by Foley, van Dam, Feiner, Hughes, it states "the compactness and simplicity of quaternions are great advantages, but difficulties arise with them as well, three of which deserve mention. First, each orientation of an object can actually be represented by two quaternions, since rotation about the axis V by an angle A is the same as rotation about -V by the angle -A; the corresponding quaternions are antipodal points on the sphere in 4D. Thus to go from one orientation to another, we may interpolate from one quaternion to either of two others; ordinarily we choose the shorter of the two great arcs. Second, orientations and rotations are not exactly the same thing: a rotation by 360 degrees is very different from a rotation by 0 degrees in an animation, but the same quaternion (1 + 0i + 0j + 0k) represents both. Thus specifying multiple rotations with quaternions requires many intermediate control points. The third difficulty is that quaternions provide an isotropic method for rotation – the interpolation is independent of everything except the relation between the initial and final rotations. This is ideal for interpolating positions of tumbling bodies, but not for interpolating the orientation of a camera in a scene: Humans strongly prefer cameras to be held upright and are profoundly disturbed by tilted cameras. Quaternions have no such preferences, and therefore should not be used for camera interpolation. The lack of an adequate method for interpolating comple camera motion has led many computer animations having static cameras or very limited camera motion" ———————— Quaternion math (used by almost every animation system on the planet for things like camera and object rotations) is polar-based (using a three-component vector and an angle/scaler), which causes a singularity along the polar axis. As the vector approaches that singularity, its orientation becomes ambiguous. In order to deal with the ambiguity, the program maintains continuity of motion (or at least tries to minimize discontinuities). This math was originally developed in the early 1800's to keep the gimbles on huge sailing ships from locking as they traversed their own polar singularities. If you're interested in learning more about it, check out an article in Computer Graphics & Applications magazine (the ACM Siggraph bible) by Ken Shoemake, 1985. He pretty much pioneered the use of them in computer animation while at Xerox Parc (as far as I can remember). There is a strong relationship between quaternion math and Euler's theorem, which states something about how any displacement of an object with a fixed centroid can be represented by a single rotation about an arbitrary axis. I hope that gives you more of what you wanted, but reading over it I'm starting to doubt that's what you had in mind when you asked the question. The short answer is that it's just the way it works. – G In addition to what Martin said about keyframing a 180-degree roll, you can also try linking everything in your scene to a dummy rotating the dummy 90-degrees on frame 0. This will likely shift the entire animation to an orientation in which you won't ever being passing the camera over the singularity at the poles. Note that the singularity is just an artifact of quanternion mathematics, which was originally developed in the 1800's to inhibit the gimbles on big sailing ships from locking. All high-end 3D animation systems use this form of math for smooth motion, but like anything it's not perfect. – G