Gimbal Lock Demonstration
Run the Gimbal Lock Demo Fullscreen
Edit the Gimbal Lock Demo with the p5.js editor
About This MicroSim
This MicroSim demonstrates gimbal lock using a physical gimbal mechanism with three nested rings. Experience firsthand how the system loses a degree of freedom when the middle ring (pitch) reaches ±90°.
How to Use
- Adjust Outer Ring (Yaw): Red ring rotates about vertical axis
- Adjust Middle Ring (Pitch): Green ring rotates about horizontal axis
- Adjust Inner Ring (Roll): Blue ring rotates about the pointing axis
- Go to Gimbal Lock: Click to set pitch to 90° instantly
- Observe the Effect: At gimbal lock, yaw and roll control the same motion
Key Concepts
| Pitch Angle | Degrees of Freedom | Status |
|---|---|---|
| 0° to 79° | 3 | Normal operation |
| 80° to 88° | 3 | Warning zone |
| 89° to 90° | 2 | Gimbal lock! |
Learning Objectives
Students will be able to: - Visualize how gimbal lock occurs physically - Understand why two axes align at the singularity - Experience the loss of controllability at gimbal lock - Recognize why quaternions were developed as an alternative
Lesson Plan
Introduction (5 minutes)
Gimbal lock is not a bug—it's a fundamental property of using three sequential rotations. Any Euler angle representation has this singularity.
Exploration (10 minutes)
- Start with all angles at zero
- Slowly increase pitch while adjusting yaw and roll
- Notice how the red and blue rings approach alignment
- At 90° pitch, try changing both yaw and roll—they produce the same motion!
Historical Context
Apollo 11's guidance system nearly experienced gimbal lock. The astronauts received "gimbal lock" warnings when the lunar module's orientation approached the singularity.