Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: Avoid Gimbal Lock, How?

  1. #1
    Intern Contributor
    Join Date
    Apr 2000
    Location
    Staten Island New York
    Posts
    53

    Avoid Gimbal Lock, How?

    What causes gimbal lock and how do you avoid it?

  2. #2
    Intern Contributor
    Join Date
    Feb 2000
    Posts
    91

    Re: Avoid Gimbal Lock, How?

    Avoiding it is best, but if you've already got it, I think that Johnson and Johnson make a cream that will clear it up....

    Sorry about that.

    Seriously. Gimbal lock is caused when you get your rotational axis into a configuration where you don't really have three independent degrees of freedom anymore. The rotational axis are only independent as long as they stay orthogonal to each other. The typical solution is to use quaternions, which I won't attempt to explain, but you should be able to do a search and come up with some explanations.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Oct 2000
    Location
    pittsburgh,pa,usa
    Posts
    128

    Re: Avoid Gimbal Lock, How?

    definitely quaternions.

    to help w/ the search.
    http://www.cs.berkeley.edu/~laura/cs...uaternion.html
    http://www.darwin3d.com/gamedev.htm#gdm0398

    the former is a technical description, while the latter is an actual implemenation by jeff lander

    i recommend the latter, as jeff lander is the man
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    I have no name that you may call me. I am merely Succinct.
    "Hey, where'd that display list rotate off to now?"

  4. #4
    Intern Contributor
    Join Date
    Jul 2000
    Location
    Braga, Portugal
    Posts
    91

    Re: Avoid Gimbal Lock, How?

    I understand Bob's definition of Gimbal Lock, however how can you achive that in OpenGL? Is it possible to get a gimbal lock only with translations, rotation and scales?

    Antonio
    Antonio Ramires Fernandes www.lighthouse3d.com

  5. #5
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: Avoid Gimbal Lock, How?

    Gimbal lock is an issue when messing with Euler angles ONLY, and has nothing to do with matrices or OpenGL. One solution is indeed quaternions, but why use quaternions? They don't give you anything you can't do with matrices. And remember, when using quaternions, you have to convert them to matrices to use them in OpenGL, so why not stick to matrices in the first place, and skip this conversion?

    Gimbal lock occurs when you are using rotations in the wrong (or a not-so-smart) way.

  6. #6
    Guest

    Re: Avoid Gimbal Lock, How?

    gimbal lock is basically applying rotation/translation etc, in the wrong order (remember, order IS important), and you get undesired results.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •