[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (OT) Re: OpenGL scenegraph

On  7 Sep, Steve Baker wrote:
> Jan Ekholm wrote:
>> On Mon, 6 Sep 1999, Bert Peers wrote:
>> >
>> >
>> >Jan Ekholm wrote:
>> >
>> >> :-) I found a short paper on quaternions, but it started off with saying
>> >> that quaternions are an extension to complex numberss. Hmm, I've always
>> >> disliked those phantasy-numbers, they seem to be totally useless.
>> >
>> >Hehe, so are real numbers.  Some real numbers (ie the ones that are not
>> >a fraction (*)) like pi or e can't ever be written down, neither as a fraction or as
>> >a finite behind-the-comma sequence of digits.  In fact fractions aren't real
>> >either, as any civil engineer knows "how much is 7/2 ?  answer 3.499999" ;)
>> <snippety snip>
>> Oh, I didn't mean to offend math... :-) I just don't like math that much,
>> and don't like to prove stuff just to see som stupid matrices work.I want
>> math to be something where you have a nice documented formula into
>> which you shove numbers and get nice results in the other end of
>> the formula. Math is a tool for me. It should work out of the box. I don't
>> want to tinker with it.
> Well, it's true that Quaternions were discovered when Hamilton was
> looking
> for a way to extend complex numbers from two numbers (Real+Imaginary) to
> three...which turns out to somehow not work out...when he realised that
> four component numbers (the 'quat' in quaternion) are actually pretty
> interesting.
> All of that is irrelevent.  Just as complex numbers can be treated as
> coordinates on a plane - or voltages and currents in an electrical
> circuit, Quaternions can be used for rotations - and it doesn't matter
> a damn that they were invented as even-more-complex numbers (like we
> need more complexity!)
> Just think of a quaternion as a vector - and a rotation about that
> vector.  (like the parameters of a glRotate command in fact)....
> except that what is stored is scaled and messed about with a bit
> to make combining quaternion rotations easier.
> Er - somewhere under all this paper on my desk, I have the
> math to convert axis/angle representation to quaternion and
> vice-versa.

And (if it hasn't been mentioned already) the nicest part about
quaternions is that they don't have annoying singularities that
Euler angle transforms can display.  In addition, the quat product
relation can give you smoother off axis rotation of vectors, points,
as well as (in some cases) having a lower computational overhead for
certain operations compared the matrix rotations.  Although the
computational savings are usually eaten by having to transform into and
out of Quat notation.

If I recall correctly some of the FlightGear project code had bib.
references to papers with quat math in them.  And GamaSutra had and
article on using Quat transforms in grafx...

Alan Chen
Aerospace Simulation Engineer and Recovering Linux Newbie
Now Running: Redhat 6.0 + Tweaks