Tuesday, July 10, 2007

Camera, Input, Gui

Studying the Gimbal Lock
The gimbal lock is pretty obvious in the following examples.
First, the camera is rotated so that is yaw is 90 degrees.



Next by shifting the pitch, the camera starts turning clockwise.



But wait.. shifting its roll also causes it to turn on clockwise in the same way it turned like when I shifted the pitch.



Thus, this is the infamous gimbal lock!

Quaternion Camera
Alright then, let's try doing the same thing to a camera operated using quaternions.

Alright then notice that I rotate the quaternion camera in the same way as I did previously with the euler camera,



Now I'll give it a little Pitch, already it is moving in a different way.



Finally, I'll move it a little on the Roll.



Comparing both cameras, it's imperative that the quaternion camera has solved the issue of the Gimbal Lock, as observed it the euler camera.

PICKING & ZOOMING
Here is the assignment on Picking & Zooming.

You can download it here: http://www.brankenonline.com/spacesimulator.net.zip

No comments: