Re: [Algorithms] Scaled quaternion rotations
Brought to you by:
vexxed72
From: Marc B. R. <mar...@or...> - 2008-06-25 14:25:39
|
>> Cayley in [1,2] demonstrates general 3D rotations via quaternions, >> (left-handed and right-handed respectively). > I'm sorry, but what separates a "left-handed" from a "right-handed" > rotation? In what space interpretation? The space is the field around the directed line (in the case of 3D), so it is independent of any coordinate frame convention and has the same meaning if you're "coordinate-free". So if your thumb (in "thumps-up" position) points in direction of the directed line, curled fingers point in the direction of the surrounding the field. (If your very double-jointed, fingers toward your palms please!) Obviously the only difference between the two is direction of the surrounding field and the two flavors are mutual inverses. Of course you can flip one into the other by either changing the direction of the directed line or negation of the angle. > It should be obvious that a rotation in left-handed space interpretation > is exactly equal to that same rotation in right-handed space > interpretation, but, because of the differences in interpretation, if > rendered into a fixed device space they will appear as mirror images. > More directly: rotation the Z unit vector around the Y unit vector as > axis by PI/2 radians always generates the X unit vector, no matter > whether you choose to interpret your coordinates left-handed, or > right-handed. What I'm calling 'right-handed' will return X, 'left-handed' will return -X. (Or vice-versa) Flip any of your coordinate definitions and the signs will flip. Stick your thumb pointing in 'Y', finger out straight on 'Z', turn pi/2 radian in the direction of your palm. Repeat with other hand and you're rotating in the opposite direction...regardless of how you name your coordinate frame. > In a left-handed coordinate space, you use the left hand > to visualize the rotation; in a right-handed coordinate space, you use > the right hand to visualize the rotation, but the actual math is exactly > the same in both cases! We're obviously using the same term to refer to two different things, because the algebraic formulations differ. Here's some sample formulas that represent rotations in quaternions, with various different constraints: Q P (1/Q) R.1 (1/Q) P Q L.1 Q P Q* R.2 |Q|=1 Q* P Q L.2 |Q|=1 Q P R.3 P.Q=0, |Q|=1 P Q L.3 P.Q=0, |Q|=1 The differences between each pair are trivially once expanded (sign differences), but they are algebraically distinct and are valid representations of rotations. > Maybe what you (or the original paper author) mean to say is "both > forward and inverse rotations" ? Cayley came up with all kinds of cool stuff, so if he wants to call stuff right & left handed...I'm all for it. <http://en.wikipedia.org/wiki/Arthur_Cayley> http://en.wikipedia.org/wiki/Arthur_Cayley (The proceeding was "tongue-in-cheek"). I personally find "forward" and "reverse" more ambiguous terms, since they require a given convention. Let's say 'counter-clockwise' and 'clockwise' when the directed line is going into your eye, and then call them 'forward' and 'reverse' or 'inverse' respectively? > Rotation math, in itself, has no > handedness; it is only the interpretation of the coordinates in the > coordinate space that is handed. It should be obvious that I disagree with this statement. And it might be more useful during algebraic manipulation to choose one form over the other, regardless of the choose direction of a 'forward' rotation. > That should be obvious to anyone who > does computer graphics, but time and again, I hear the mis-nomers > "left/right-handed rotation" and it drives me nuts! It's as bad as > talking about "row major matrices" without specifying whether you're > using row vectors (on the left) or column vectors (on the right). |