• Advertisement
Sign in to follow this  

Who knows "Gimbal Lock" clearly?

This topic is 4728 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

when i read some books in computer graphics, i meet "gimbal lock". i know that ti's a phenomenon when we rotate objects with eular angles. and we can avoid it by quaternion. but i can't imagine what is "gimbal lock"..., and learned it unclearly. anyone who knows it clearly can explain it to me? thanx a lot!!

Share this post


Link to post
Share on other sites
Advertisement
And in labours terms:
The Gimbal Lock occurs if you i.e. rotate you y-axis around your x-axis by Pi/2. Then your y-axis will be rotated down in your z-axis and you will loose a degree-of-freedom. Any rotation around your y-axis will here after be identical to a rotation around the z-axis!

If you've ever seen the movie Apollo 13, you'll notice that one of the astronauts yell "Oh no! It's the Gimbal Lock!" when they'll have to steer manually :)
Gimbals wasen't implemented in the first space-ships due to their weight and astronauts were actually trained to work around the Gimbal Lock ;)

Best regards,
Roquqkie

Share this post


Link to post
Share on other sites
Quote:
Original post by Roquqkie
And in labours terms:
The Gimbal Lock occurs if you i.e. rotate you y-axis around your x-axis by Pi/2. Then your y-axis will be rotated down in your z-axis and you will loose a degree-of-freedom. Any rotation around your y-axis will here after be identical to a rotation around the z-axis!


i follow your method:
i rotate my y-axis around my x-axis by Pi/2, then my y-axis will be rotated down in my z-axis. but at this time, my z-axis is not there, it also rotated...

can you say it more clearly :) thx~~

Share this post


Link to post
Share on other sites
it rotates, but the rotations are applied serially, first the rotation on the X axis, then the rotation on the Y axis and finally the rotation on the Z axis, by the time you get to Z, Z may have become the same as X thus you lose one degree of freedom.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kwizatz
by the time you get to Z, Z may have become the same as X thus you lose one degree of freedom.


i can't understand "Z may become the same as X". Do you mean that when the z-axis rotation is over, the object's position is the same with position after x-axis rotation?

there are 2 transformations:

1) rotate on x-axis, the angle, for example, is alpha. then rotate on y-axis, the angle is Pi/2.

2) rotate on y-axis, Pi/2, then rotate on z-axis, the angle is alpha.

the 2 transformations get the same result. the position of the object is the same. thus, a degree of freedom is lost.

is it a "Gimbal Lock"?

if i use quaternion to rotate it, the result is what?

Thanx for the warmhearted-man who try to explain "gimbal lock" to me. Thank you!

Share this post


Link to post
Share on other sites
Imagine you are standing on a very flat desert, staring at a point on the horizon. X is right, Y is up, Z is forward. There are three directions you can rotate:

Y: turn left or right in a circle
X: look up or down
Z: turn your head around so that up becomes right, becomes down, becomes left, etc.

Now as you rotate around X upwards towards straight up, notice what happens to Y and Z. The Y rotation follows smaller and smaller circles around the sky as you look higher up, and Z is still just turning the whole image around its center.

When X is 90 degrees and you're looking straight up, Y (turning around in a circle) is the same as Z (turning your head) because the two are aligned. This alignment is called Gimbal Lock.

Quaternions are essentially a rotation in 4 dimensional space, with four axes so they don't lock, however they have other issues which I don't have the time to explain - there are books devoted to that kind of thing.

Tom

Share this post


Link to post
Share on other sites
Quote:
Original post by nasi
Quote:
Original post by Kwizatz
by the time you get to Z, Z may have become the same as X thus you lose one degree of freedom.


i can't understand "Z may become the same as X". Do you mean that when the z-axis rotation is over, the object's position is the same with position after x-axis rotation?

there are 2 transformations:

1) rotate on x-axis, the angle, for example, is alpha. then rotate on y-axis, the angle is Pi/2.

2) rotate on y-axis, Pi/2, then rotate on z-axis, the angle is alpha.

the 2 transformations get the same result. the position of the object is the same. thus, a degree of freedom is lost.

is it a "Gimbal Lock"?

if i use quaternion to rotate it, the result is what?

Thanx for the warmhearted-man who try to explain "gimbal lock" to me. Thank you!


Yes, you have got it. Gimbal lock happens because the angles are given in terms of moving axes. Resulting in that at certain angles and sets of rotations a degree of freedom is lost when two angles begin to describe the same axes (rotations). Gimbal lock does not happen with quaternions.

Share this post


Link to post
Share on other sites
Quote:
Original post by nasi
i can't understand "Z may become the same as X". Do you mean that when the z-axis rotation is over, the object's position is the same with position after x-axis rotation?


No, it means that if the second rotation (Y or pitch) is 90 or -90 then the final axis would be pointing in the same direction as the first so if before the rotation you had the X axis going from -infinite X to +infinite X and Z from -infinite Z to +infinite Z, before doing the Z rotation and after x and Y, Z will go from -infinite X to +infinite X, the same as the X axis, thus this final rotation will be the same as if you were rotating on X, you lose the Z degree of freedom.

Gimbal lock is much easier to understand once it is screwing your application/game/animation/simulation [smile]

Share this post


Link to post
Share on other sites
Quote:
Original post by Kwizatz
Quote:
Original post by nasi
i can't understand "Z may become the same as X". Do you mean that when the z-axis rotation is over, the object's position is the same with position after x-axis rotation?


No, it means that if the second rotation (Y or pitch) is 90 or -90 then the final axis would be pointing in the same direction as the first so if before the rotation you had the X axis going from -infinite X to +infinite X and Z from -infinite Z to +infinite Z, before doing the Z rotation and after x and Y, Z will go from -infinite X to +infinite X, the same as the X axis, thus this final rotation will be the same as if you were rotating on X, you lose the Z degree of freedom.

Gimbal lock is much easier to understand once it is screwing your application/game/animation/simulation [smile]


It looks like he understands the concept from the example he gave, his intentions (with respect to his definition of position) may simply have been lost in translation.[smile] Anyway, the clarification is nonetheless beneficial.

Share this post


Link to post
Share on other sites
Quote:
Original post by Daerax
It looks like he understands the concept from the example he gave, his intentions (with respect to his definition of position) may simply have been lost in translation.[smile] Anyway, the clarification is nonetheless beneficial.


Yeah, you're right, I had to read his conclusion a couple of times and even then I didnt know if what I understood was right [smile].

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement