Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


quaternion/euler angle rotation


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 KeithW   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 September 2001 - 01:41 PM

Where can I find a reference on how to do basic conversions from one position to another? I want to know how to do the "typical" 3D spaceship that can roll and yaw (bank) in a turn while simultaneously pitching up or down. I need to know how to go from one position to another. I realize Euler angles have the whole gimbal lock problem but I just don''t understand quaternions. Where is a good place to figure this stuff out? Thanks.

Sponsor:

#2 blackbot20   Members   -  Reputation: 118

Like
Likes
Like

Posted 25 September 2001 - 02:10 PM

Most people say the best book on the subject is Jack Kuipers "Quaternions and Rotation Sequences". It describes this from the ground up. I highly recommend it.

But basically you can forgo the Quaternions and build a rotation matrix by tracking the current yall, pitch and, row for your ship. Then using these angles to build a rotation matrix by multiplying the yall rotation matrix (done about the up axis), by the pitch rotation matrix (done about the right axis) and, by the roll rotation matrix (done about the look axis). The order of the rotations does not matter.

Or you can keep track of the three current look, up, and right axises for the ship and rotate the current delta yall, pitch, roll rotations about these arbitrary axises.

For either of these methods I suggest keeping each of the rotation angles between -180 degrees (-PI) to 180 degrees (PI) where zero is no rotation. This will keep things simple.

Gimbal lock will not be a problem if you do it like this.

Hope this helps.


#3 silvren   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 September 2001 - 08:44 AM

quote:

But basically you can forgo the Quaternions and build a rotation matrix by tracking the current yall, pitch and, row for your ship. Then using these angles to build a rotation matrix by multiplying the yall rotation matrix (done about the up axis), by the pitch rotation matrix (done about the right axis) and, by the roll rotation matrix (done about the look axis). The order of the rotations does not matter.



Hmm, is that true? From matrix algebra I remember that matrix multiplication is not....commutative? I mean, AB is in general not the same as BA, but is it in this case?



/Mankind gave birth to God.

#4 Beer Hunter   Members   -  Reputation: 712

Like
Likes
Like

Posted 27 September 2001 - 04:36 PM

AB != BA, but (AB)C == A(BC).

#5 blackbot20   Members   -  Reputation: 118

Like
Likes
Like

Posted 05 October 2001 - 10:03 AM

BeerHunter's hit it 100%.

Even though generally in matrix algebra AB != BA, the reason I say the order of the rotations don't matter is that for matrix rotations the order doesn't matter (At least for rotations on that anises that are orthogonal (perpendicular) -- like just on the X, Y, or Z axises. I'm not 100% sure if this is true for arbitrary rotations about any vector, but I think this property is true for those types of rotations also.) This is because of the unique properties of rotation matrixes. The proof for this is a bit much for me to go into here. but, the reason is explained quite well in that Quaternion book -- as it applies to Quaternions that is.

Mike

Edited by - blackbot20 on October 5, 2001 5:04:08 PM

Edited by - blackbot20 on October 5, 2001 5:04:59 PM




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS