Skip to main content
gamedev.net
🔒 Locked

quick question

Started by no one Sep 7, 2003 at 2:45 PM 1 replies 550+ views
Original Post
no one
no one
Hiya I read somewhere that you can use quaternions instead of matrices which can be faster and easier to use. Would anyone recommend it, and if so could you point me to an article maybe that talks about it? Thanks a bunch.
"Make it a habit to be loyal to the activities that serve the highest part of yourself."
dmounty
dmounty
Basically, there is a homeomorphism between the field of quaternions (known as H), or more specifically the unit sphere in this space, and orientation in R3. The very useful property of this subspace of H is that the line between points on the surface of this sphere represent minimum angle variation changes in orientation. That is to say, it gives you a straighforward way to move between two orientations, without the inherent problems of using standard euler angle interpolation (gimbal lock etc.). They can be specifically useful, to produce smooth camera movement. Here is a link.

http://www.gamedev.net/reference/articles/article1095.asp
no one
no one
Thanks for the link!
I should have mentioned though that I was also wondering about
parent/child movement using quaternions instead of matrices,
im using OpenGL by the way. With 4x4 matrices, you can simple call glLoadMatrixf() to apply transformations to objects, but what about with quaternions...

glRotatef(quaternion.x,1,0,0);
...

doing it that way though you may as well use vectors for everything.


[edited by - no one on September 7, 2003 4:03:37 PM]
"Make it a habit to be loyal to the activities that serve the highest part of yourself."

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.