Greetings! I'm trying to understand what is Gimbal Lock. After some digging I can explain it with words like this - with some combinations of cardinal axes and Euler Angles we lost one degree of freedom because two axes became parallel. Now I want to prove it mathematicaly. This what we have:
.....|1.....0.......0|
Rx = |0....cosA..sinA|
.....|0...-sinA..cosA|
.....|cosB..0...-sinB|
Ry = |0.....1.......0|
.....|sinB..0....cosB|
.....|cosC...sinC...0|
Rz = |-sinC..cosC...0|
.....|0.......0.....1|
Now we can get Gimbal Lock multiplyig matrices in that order (from left to right): Ry * Rx * Rz, where A = 90 deg. We have:
|1 0 0|
Rx = |0 0 1|
|0 -1 0|
..........|cosB..0...-sinB|...|1...0...0|...|cosB...sinB...0|
Ry * Rx = |0.....1.......0| * |0...0...1| = |0.......0.....1|
..........|sinB..0....cosB|...|0..-1...0|...|sinB..-cosB...0|
...............|cosB...sinB...0|...|cosC...sinC...0|
Ry * Rx * Rz = |0.......0.....1| * |-sinC..cosC...0| =
...............|sinB..-cosB...0|...|0.......0.....1|
..|cosB * cosC - sinB * sinC......cosB * sinC + sinB * cosC.....0|
= |0..........................................0.................1| =
..|sinB * cosC - cosB * sinC......sinB * sinC - cosB * cosC.....0|
..|cos(B + C)...sin(B + C)...0|
= |0................0........1|
..|sin(B + C)..-cos(B + C)...0|
So, our final matrix is very strange. I thought it should be same as Ry since rotations are the same. Why it difers?
Show differencesHistory of post edits
#5Volgogradetzzz
Posted 05 September 2012 - 08:29 AM
Greetings! I'm trying to understand what is Gimbal Lock. After some digging I can explain it with words like this - with some combinations of cardinal axes and Euler Angles we lost one degree of freedom because two axes became parallel. Now I want to prove it mathematicaly. This what we have:
.....|1.....0.......0|
Rx = |0....cosA..sinA|
.....|0...-sinA..cosA|
.....|cosB..0...-sinB|
Ry = |0.....1.......0|
.....|sinB..0....cosB|
.....|cosC...sinC...0|
Rz = |-sinC..cosC...0|
.....|0.......0.....1|
Now we can get Gimbal Lock multiplyig matrices in that order (from left to right): Ry * Rx * Rz, where A = 90 deg. We have:
| 1 0 0 |
Rx = | 0 0 1 |
| 0 -1 0 |
| cosB 0 -sinB | | 1 0 0 | | cosB sinB 0 |
Ry * Rx = | 0 1 0 | * | 0 0 1 | = | 0 0 1 |
| sinB 0 cosB | | 0 -1 0 | | sinB -cosB 0 |
| cosB sinB 0 | | cosC sinC 0 |
Ry * Rx * Rz = | 0 0 1 | * |-sinC cosC 0 | =
| sinB -cosB 0 | | 0 0 1 |
| cosB * cosC - sinB * sinC cosB * sinC + sinB * cosC 0 |
= | 0 0 1 | =
| sinB * cosC - cosB * sinC sinB * sinC - cosB * cosC 0 |
| cos(B + C) sin(B + C) 0 |
= | 0 0 1 |
| sin(B + C) -cos(B + C) 0 |
So, our final matrix is very strange. I thought it should be same as Ry since rotations are the same. Why it difers?
.....|1.....0.......0|
Rx = |0....cosA..sinA|
.....|0...-sinA..cosA|
.....|cosB..0...-sinB|
Ry = |0.....1.......0|
.....|sinB..0....cosB|
.....|cosC...sinC...0|
Rz = |-sinC..cosC...0|
.....|0.......0.....1|
Now we can get Gimbal Lock multiplyig matrices in that order (from left to right): Ry * Rx * Rz, where A = 90 deg. We have:
| 1 0 0 |
Rx = | 0 0 1 |
| 0 -1 0 |
| cosB 0 -sinB | | 1 0 0 | | cosB sinB 0 |
Ry * Rx = | 0 1 0 | * | 0 0 1 | = | 0 0 1 |
| sinB 0 cosB | | 0 -1 0 | | sinB -cosB 0 |
| cosB sinB 0 | | cosC sinC 0 |
Ry * Rx * Rz = | 0 0 1 | * |-sinC cosC 0 | =
| sinB -cosB 0 | | 0 0 1 |
| cosB * cosC - sinB * sinC cosB * sinC + sinB * cosC 0 |
= | 0 0 1 | =
| sinB * cosC - cosB * sinC sinB * sinC - cosB * cosC 0 |
| cos(B + C) sin(B + C) 0 |
= | 0 0 1 |
| sin(B + C) -cos(B + C) 0 |
So, our final matrix is very strange. I thought it should be same as Ry since rotations are the same. Why it difers?
#4Volgogradetzzz
Posted 05 September 2012 - 08:28 AM
Greetings! I'm trying to understand what is Gimbal Lock. After some digging I can explain it with words like this - with some combinations of cardinal axes and Euler Angles we lost one degree of freedom because two axes became parallel. Now I want to prove it mathematicaly. This what we have:
.....|1.....0.......0|
Rx = |0....cosA..sinA|
.....|0...-sinA..cosA|
.....|cosB..0...-sinB|
Ry = |0.....1.......0|
.....|sinB..0....cosB|
.....|cosC...sinC...0|
Rz = |-sinC..cosC...0|
.....|0.......0.....1|
Now we can get Gimbal Lock multiplyig matrices in that order (from left to right): Ry * Rx * Rz, where A = 90 deg. We have:
So, our final matrix is very strange. I thought it should be same as Ry since rotations are the same. Why it difers?
.....|1.....0.......0|
Rx = |0....cosA..sinA|
.....|0...-sinA..cosA|
.....|cosB..0...-sinB|
Ry = |0.....1.......0|
.....|sinB..0....cosB|
.....|cosC...sinC...0|
Rz = |-sinC..cosC...0|
.....|0.......0.....1|
Now we can get Gimbal Lock multiplyig matrices in that order (from left to right): Ry * Rx * Rz, where A = 90 deg. We have:
[font=courier new,courier,monospace] | 1 0 0 | Rx = | 0 0 1 | | 0 -1 0 | | cosB 0 -sinB | | 1 0 0 | | cosB sinB 0 | Ry * Rx = | 0 1 0 | * | 0 0 1 | = | 0 0 1 | | sinB 0 cosB | | 0 -1 0 | | sinB -cosB 0 |[/font] [font=courier new,courier,monospace] | cosB sinB 0 | | cosC sinC 0 | [/font] [font=courier new,courier,monospace]Ry * Rx * Rz = | 0 0 1 | * |-sinC cosC 0 | = | sinB -cosB 0 | | 0 0 1 | [/font] | cosB * cosC - sinB * sinC cosB * sinC + sinB * cosC 0 | = | 0 0 1 | = | sinB * cosC - cosB * sinC sinB * sinC - cosB * cosC 0 | [b][font=courier new,courier,monospace] | cos(B + C) sin(B + C) 0 |[/font][/b] [font=courier new,courier,monospace] = [b]| 0 0 1 |[/b][/font] [b][font=courier new,courier,monospace] | sin(B + C) -cos(B + C) 0 |[/font][/b]
So, our final matrix is very strange. I thought it should be same as Ry since rotations are the same. Why it difers?
#3Volgogradetzzz
Posted 05 September 2012 - 08:27 AM
Greetings! I'm trying to understand what is Gimbal Lock. After some digging I can explain it with words like this - with some combinations of cardinal axes and Euler Angles we lost one degree of freedom because two axes became parallel. Now I want to prove it mathematicaly. This what we have:
.....| 1 0 0 |
Rx = | 0 cosA sinA |
.....| 0 -sinA cosA |
.....| cosB 0 -sinB |
Ry = | 0 1 0 |
.....| sinB 0 cosB |
.....| cosC sinC 0 |
Rz = |-sinC cosC 0 |
.....| 0 0 1 |
Now we can get Gimbal Lock multiplyig matrices in that order (from left to right): Ry * Rx * Rz, where A = 90 deg. We have:
So, our final matrix is very strange. I thought it should be same as Ry since rotations are the same. Why it difers?
.....| 1 0 0 |
Rx = | 0 cosA sinA |
.....| 0 -sinA cosA |
.....| cosB 0 -sinB |
Ry = | 0 1 0 |
.....| sinB 0 cosB |
.....| cosC sinC 0 |
Rz = |-sinC cosC 0 |
.....| 0 0 1 |
Now we can get Gimbal Lock multiplyig matrices in that order (from left to right): Ry * Rx * Rz, where A = 90 deg. We have:
[font=courier new,courier,monospace] | 1 0 0 | Rx = | 0 0 1 | | 0 -1 0 | | cosB 0 -sinB | | 1 0 0 | | cosB sinB 0 | Ry * Rx = | 0 1 0 | * | 0 0 1 | = | 0 0 1 | | sinB 0 cosB | | 0 -1 0 | | sinB -cosB 0 |[/font] [font=courier new,courier,monospace] | cosB sinB 0 | | cosC sinC 0 | [/font] [font=courier new,courier,monospace]Ry * Rx * Rz = | 0 0 1 | * |-sinC cosC 0 | = | sinB -cosB 0 | | 0 0 1 | [/font] | cosB * cosC - sinB * sinC cosB * sinC + sinB * cosC 0 | = | 0 0 1 | = | sinB * cosC - cosB * sinC sinB * sinC - cosB * cosC 0 | [b][font=courier new,courier,monospace] | cos(B + C) sin(B + C) 0 |[/font][/b] [font=courier new,courier,monospace] = [b]| 0 0 1 |[/b][/font] [b][font=courier new,courier,monospace] | sin(B + C) -cos(B + C) 0 |[/font][/b]
So, our final matrix is very strange. I thought it should be same as Ry since rotations are the same. Why it difers?
#2Volgogradetzzz
Posted 05 September 2012 - 08:26 AM
Greetings! I'm trying to understand what is Gimbal Lock. After some digging I can explain it with words like this - with some combinations of cardinal axes and Euler Angles we lost one degree of freedom because two axes became parallel. Now I want to prove it mathematicaly. This what we have:
| 1 0 0 |
Rx = | 0 cosA sinA |
| 0 -sinA cosA |
| cosB 0 -sinB |
Ry = | 0 1 0 |
| sinB 0 cosB |
| cosC sinC 0 |
Rz = |-sinC cosC 0 |
| 0 0 1 |
Now we can get Gimbal Lock multiplyig matrices in that order (from left to right): Ry * Rx * Rz, where A = 90 deg. We have:
So, our final matrix is very strange. I thought it should be same as Ry since rotations are the same. Why it difers?
| 1 0 0 |
Rx = | 0 cosA sinA |
| 0 -sinA cosA |
| cosB 0 -sinB |
Ry = | 0 1 0 |
| sinB 0 cosB |
| cosC sinC 0 |
Rz = |-sinC cosC 0 |
| 0 0 1 |
Now we can get Gimbal Lock multiplyig matrices in that order (from left to right): Ry * Rx * Rz, where A = 90 deg. We have:
[font=courier new,courier,monospace] | 1 0 0 | Rx = | 0 0 1 | | 0 -1 0 | | cosB 0 -sinB | | 1 0 0 | | cosB sinB 0 | Ry * Rx = | 0 1 0 | * | 0 0 1 | = | 0 0 1 | | sinB 0 cosB | | 0 -1 0 | | sinB -cosB 0 |[/font] [font=courier new,courier,monospace] | cosB sinB 0 | | cosC sinC 0 | [/font] [font=courier new,courier,monospace]Ry * Rx * Rz = | 0 0 1 | * |-sinC cosC 0 | = | sinB -cosB 0 | | 0 0 1 | [/font] | cosB * cosC - sinB * sinC cosB * sinC + sinB * cosC 0 | = | 0 0 1 | = | sinB * cosC - cosB * sinC sinB * sinC - cosB * cosC 0 | [b][font=courier new,courier,monospace] | cos(B + C) sin(B + C) 0 |[/font][/b] [font=courier new,courier,monospace] = [b]| 0 0 1 |[/b][/font] [b][font=courier new,courier,monospace] | sin(B + C) -cos(B + C) 0 |[/font][/b]
So, our final matrix is very strange. I thought it should be same as Ry since rotations are the same. Why it difers?
#1Volgogradetzzz
Posted 05 September 2012 - 08:25 AM
Greetings! I'm trying to understand what is Gimbal Lock. After some digging I can explain it with words like this - with some combinations of cardinal axes and Euler Angles we lost one degree of freedom because two axes became parallel. Now I want to prove it mathematicaly. This what we have:
Now we can get Gimbal Lock multiplyig matrices in that order (from left to right): Ry * Rx * Rz, where A = 90 deg. We have:
So, our final matrix is very strange. I thought it should be same as Ry since rotations are the same. Why it difers?
[font=courier new,courier,monospace] | 1 0 0 | Rx = | 0 cosA sinA | | 0 -sinA cosA |[/font] [font=courier new,courier,monospace] | cosB 0 -sinB | Ry = | 0 1 0 | | sinB 0 cosB |[/font] [font=courier new,courier,monospace] | cosC sinC 0 | Rz = |-sinC cosC 0 | | 0 0 1 |[/font]
Now we can get Gimbal Lock multiplyig matrices in that order (from left to right): Ry * Rx * Rz, where A = 90 deg. We have:
[font=courier new,courier,monospace] | 1 0 0 | Rx = | 0 0 1 | | 0 -1 0 | | cosB 0 -sinB | | 1 0 0 | | cosB sinB 0 | Ry * Rx = | 0 1 0 | * | 0 0 1 | = | 0 0 1 | | sinB 0 cosB | | 0 -1 0 | | sinB -cosB 0 |[/font] [font=courier new,courier,monospace] | cosB sinB 0 | | cosC sinC 0 | [/font] [font=courier new,courier,monospace]Ry * Rx * Rz = | 0 0 1 | * |-sinC cosC 0 | = | sinB -cosB 0 | | 0 0 1 | [/font] | cosB * cosC - sinB * sinC cosB * sinC + sinB * cosC 0 | = | 0 0 1 | = | sinB * cosC - cosB * sinC sinB * sinC - cosB * cosC 0 | [b][font=courier new,courier,monospace] | cos(B + C) sin(B + C) 0 |[/font][/b] [font=courier new,courier,monospace] = [b]| 0 0 1 |[/b][/font] [b][font=courier new,courier,monospace] | sin(B + C) -cos(B + C) 0 |[/font][/b]
So, our final matrix is very strange. I thought it should be same as Ry since rotations are the same. Why it difers?