Quote:Original post by SnotBob
Quote:Original post by erissian
3D rotation can't properly be expressed by a single rotation.
Say what? That statement refutes itself. In any case, the orientation of a body can be expressed with an angle and an axis. The 'difference' between any two orientation can also be expressed in such a way, although there maybe multiple ways of presenting the same orientation or rotation.
Sorry, that was poorly worded. Now that I'm less distracted, let me clarify: A single rotation about an arbitrary axis is insufficient to cover all the degrees of freedom available in three dimensions of space. You need at least two rotations in sequence to cover all of those possibilities, at least in rectilinear coordinates, otherwise you need more. Back to the airplane, you can make the nose point in any direction using a single rotation, but you have no control over where the wings will be pointing.
I bring this up because pjyelton appears to be looking for a way to calculate the arguments to a single glRotate() call that replaces an arbitrary number of rotations, along a series of arbitrary axes.
Quote:
Quote:Original post by erissian
That's why we use matrices and quaternions.
Rotation matrices and quaternions express exactly the same thing. Just in two different ways, with different pros and cons.
Quaternions and 4x4 rotation matrices can be made to express the same information, and for 3D graphics they are used to identical ends, but they are in fact very different beasts and operate on themselves in unique ways.
The biggest benefit of quaternions over matrices is that they are far more convenient to interpolate, followed by their size in memory, being less expensive computationally, and, if need be, ease of normalization.
Matrices are more intuitive for beginners to use, are easy to construct, are the actual format used in transformations, and allow the incorporation of other transformations.
There is plenty of information on both matters on this board, under Articles & Resources. They both have places where they excel, and I personally use both liberally through my programs, depending on the particular problem.
[Edited by - erissian on May 11, 2008 2:34:34 AM]
We''re sorry, but you don''t have the clearance to read this post. Please exit your browser at this time. (Code 23)