# Creating gimbel lock

3 replies to this topic

### #1ameijer

New Member

• Members
• 5 posts

Posted 13 July 2003 - 08:32 PM

In order to avoid creating gimbal locks, I want to be able to create them, understand them. Problem is I fail abysmally.

The symptoms of gimbal lock as I understand it are that after some rotations around one axis, following rotations about the other two axis look the same or at least inverted. This can only be achieved by letting the latter 2 axis (or is the plural axises?) be parallel.

I read a GameDev article which said that this comes about by using Eulerangles and matrices. Each Eulermatrix rotatates about 1 axis. Rotations about more than 1 axis is achieved by multiplying E-Matrices. Eulermatrices are orthonormal therefore the original orthogonal basis of our coordinate system gets transformed into another orthogonal system after multiplication. And orthogonal systems have no two parallel axis. It is true that there are two (or more) triples of angles that when entered into Euler matrices give the same result, but that was not described as gimbla lock.

If you always rotate about the world coordinate system, gimbal lock cannot appear either as the world coordinate system obviously has no two parallel axis.

The only way to create gimbal lock as I understand it is mixing the two methods of rotation. But mixing the two is like mixing beer and wine and complaining that it tastes bad ( I never tried, have you?).

### #2Jesse M

Member

• Members
• 32 posts

Posted 15 July 2003 - 05:23 PM

I once suffered from gimbal lock. Or at least I *think* it was gimbal lock. I wrote a camera class and was testing in on a 2d grid. Rotating pitch and yaw was perfect, but as soon as I tried to roll it began to fudge the previous 2 axis. The more you fidel with it, the more it messed up.

I fixed this with quaternions however. Funny story... When I looked up "gimbal lock" on google it came up with this site for a band called "gimbal lock". They're a bunch of math geeks who named themselves after the matrix problem. I laughed my ass off.
FRAG THE PLANET
Ed Helms: Alcohol causes problems and guns solve problems. I don't see why you can't have guns in bars.
Other guy: That's a stupid idea.
Ed Helms: Yeah, if your a pussy.

### #3moomin

Member

• Members
• 44 posts

Posted 17 July 2003 - 10:02 AM

As I recall gimble lock is created when all 3 axis rotations occur, this results in a overwriting of the values.

So try to do something that involves rotations along each plane simulatenously

### #4Kenneth Gorking

Senior Member

• Members
• 939 posts

Posted 01 September 2004 - 07:41 PM

I think gimbal lock occurs when you rotate one axis, and it is mapped onto another axis, making them parallel, and when this happens you lose a degree of freedom, because your matrix has been reduced to a 2D matrix. When you try rotate one the axis' involved, the other axis mapped onto it will follow along, and thats what its called Gimbal Lock.
"Stupid bug! You go squish now!!" - Homer Simpson

#### 1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users