Re: Quaternion Camera



Tony O'Bryan wrote:
It's not very hard once it's laid out in layman's terms.  I'm
not a math type by any means, so you can rest assured that matrices for
basic 3D manipulations with OpenGL are not that tough.


The best thing about matrices is that they do *everything*.

Quaternions don't. A quaternion is only a rotation,
nothing more. For real life usage you also need a
translation and often a scale factor as well. By the
time you've bolted all this together then your
quaternions aren't going to be looking so neat and
tidy any more.

For example, how do I move "forwards" in a quaternion
representation? With a matrix it's easy - the second
(or third) row of the matrix is your "forward" vector.
Just multiply it by your speed and add it to the position
(bottom row of the matrix). A quaternion is a lot more
complex, and that's what Dave's paper which "proves"
that quaternions are faster fails to take into account,
- ie. that real life is more than just joining rotations
together.

I suggest a Matrix class which has an extra flag to
tell you the contents:

"ROTATION" - only the top 3x3 is useful
"RIGID" - a rotation and a translation
"AFFINE" - rotation, translation and scale.
"GENERAL" - all 4x4 entries are used (eg. for Beziers)

Your matrix multiply can now look at the two matrices
and optimize accordingly (you know where the ones
and zeros are).

Matrix inversions can also be very much faster
with this scheme (eg. the inverse of a rotation
is just the transpose...etc).

I'm betting that such a matrix scheme is faster
than quaternions in real life and just as
powerful.

--
<\___/>
/ O O \
\_____/  FTB.    For email, remove my socks.

In science it often happens that scientists say, 'You know
that's a really good argument; my position is mistaken,'
and then they actually change their minds and you never
hear that old view from them again.  They really do it.
It doesn't happen as often as it should, because scientists
are human and change is sometimes painful.  But it happens
every day.  I cannot recall the last time something like
that happened in politics or religion.

- Carl Sagan, 1987 CSICOP keynote address

.



Relevant Pages

  • Re: Structured spacetime
    ... axes (timelike is the rotation axis, ... I can sort of imagine that, and to the extent I can see it ... cross product, just as electromagnetism is. ... Since the idea of a 'real' imaginary space isn't consistent with some fundamental assumtions of QM, the content of QM have to be rebuild with those quaternions alone ...
    (sci.physics.relativity)
  • Re: Quaternions, Penrose Road to Reality ch. 11.3
    ... >>I'm attempting to gain a physical feeling for quaternions and have got ... > As for quaternions and the belt trick: The belt is a fun insight by ... and draw loops starting and ending there. ... > is that a 360 degree rotation path is *not* equivalent to a null path! ...
    (comp.graphics.algorithms)
  • Re: Defining Rotations Limits using Quaternions In 3d Space
    ... the rotation that occurs between ones upper and lower arm at the elbow ... using euler angles it may be achieved using 3 such angles. ... I am looking to achieve this using one or more quaternions. ... The example for the human arm is a difficult one: ...
    (comp.graphics.algorithms)
  • Re: rotation and lightspeed
    ... in my model of spinning quaternions I get a problem: ... This rotation is assigned to an element of spacetime and I ... would need a kind of clock in this element and hence lose the ... I dont think quaternions are that difficult. ...
    (sci.physics.relativity)

Loading