Archived

This topic is now archived and is closed to further replies.

olp-fan

Quaternions? Quaternions!

Recommended Posts

olp-fan    122
Basically, I hate implementing something if I don''t understand it. But I really wanted to implement them since they offered so many benefits. So I pulled out some paper, opened up http://http.cs.berkeley.edu/~laura/cs184/quat/quaternion.html and got to work. If I didn''t just finish taking University Algebra, I probably wouldn''t have done it, but I did convince myself and understand quaternions. Its not that university algebra is complicated or that it helped me understand quaternions, but what it really did was make me "rely on the algebra" as my professor puts succinctly. Trying to understand quaternion rotations is pointless, but the algebra make so sense. All you gotta do is take out a pad of paper and follow the website and work from first principles, and when you''ve finished deriving a portion of it, check the website to see if you are right. Essentially quaternions provide a more powerful data structure and theoretical structure that reduces computations. I think a lot of people''s problems in understanding things like Quaternions, 4D Spheres, etc. etc. is that they rely on the geometry of it... which is to be expected from 3D programmers and 3D modellers. But I think when you start referring to 3 dimensions as 3-space with 3-tuples and column vectors, you''re on your way to understanding quaternions. So, if you agree with me that you gotta throw out geometry when considering abstract things and rely on the algebra, then you are well on your way to becoming someone who writes the white papers as opposed to just reading them. =) no? - Tom

Share this post


Link to post
Share on other sites
johnb    351
I think you need both geometry and algebra to fully understand the math of 3D games in general (e.g. for dynamics and graphics) and quaternions in particular. Perhaps it is better to describe them as theory and practice, that is you can just learn the practice and how to use quaternions, or you can also learn the theory behind them.

If you just rely on the practice you are limited as you are only able to apply what you know. If you understand the theory you might be able to apply it to different situations, you might be able to recognise when it could be improved, or fix it when it breaks down. And you are far more likely to remember a whole theory than a collection of different unconnected techniques.

John

Share this post


Link to post
Share on other sites
olp-fan    122
Yeah, I totally agree that you need geometry and algebra to understand and apply the math behind 3d games. Its just when you want to understand abstract things like quaternions, the answer to the question of a rotation in 3-space is counter-intuitive and therefore shouldn''t be considered... its all in the algebra.

And theory and practice is true too, and thats why i wanted to develop the quaternion stuff myself as opposed to just regurgitate code. I still can''t read the intense white papers since i don''t yet understand stuff like double integrals, but I''ll save that yummy stuff for next term. But thats calculus, another story =)

- Tom

Share this post


Link to post
Share on other sites
johnb    351
> Its just when you want to understand abstract things like
> quaternions, the answer to the question of a rotation in 3-
> space is counter-intuitive and therefore shouldn''t be
> considered... its all in the algebra.

It depends on your intuition: I don''t find quaternions counter-intuitive at all, though I''ve probably spent more time studying them than most people. They are counter-intuitive at first because they do not seem a natural extension of vector and matrix algebra, and if your high school 3D math was based entirely on vectors and matrices they are quite a departure. But they can be easily developed from geometry and/or as an extension of complex numbers, and then integrated into 3D math.

Share this post


Link to post
Share on other sites