[vtkusers] Gimbal Lock?

Wes Turner wes.turner at kitware.com
Thu Apr 15 14:36:20 EDT 2010


Good to hear!  Have fun.

- Wes

On Thu, Apr 15, 2010 at 2:28 PM, Robbie Banks <robbie.banks at gmail.com>wrote:

>  Perfect.
>
>
>
> I was rotating 10 degrees at a time, but as you mentioned because the view
> up wasn’t sorted, it lost the plot when it hit 90. All working now.
>
>
>
> Thanks
>
> Robbie
>
>
>
> *From:* Wes Turner [mailto:wes.turner at kitware.com]
> *Sent:* Thursday, April 15, 2010 11:13 AM
> *To:* Robbie Banks
> *Cc:* vtkusers at vtk.org
>
> *Subject:* Re: [vtkusers] Gimbal Lock?
>
>
>
> Hey Robbie,
>
> In general we try to keep cc'ing the conversation to the list.  This both
> allows for other users to find an answer in the archives and gives you
> access to more brains.
>
> You are probably doing something like;
>
> camera->Elevation(90);
>
> After which Elevation no longer works because it rotates around the cross
> product of the ViewUp and DirectionOfProjection vectors and you just made
> them colinear.  if instead you do:
>
> camera->Elevation(45);
> camera->OrtogonalizeViewUp()
> camera->Elevation(45);
> camera->OrtogonalizeViewUp()
>
> Everything should continue to work.
>
> On Thu, Apr 15, 2010 at 1:18 PM, Robbie Banks <robbie.banks at gmail.com>
> wrote:
>
> Hi Wes,
>
>
>
> I think I understand what you mean, but could you provide a simple example?
>
>
>
> R
>
>
>
> *From:* Wes Turner [mailto:wes.turner at kitware.com]
> *Sent:* Thursday, April 15, 2010 6:27 AM
> *To:* Robbie Banks
> *Cc:* David Doria; vtkusers at vtk.org
> *Subject:* Re: [vtkusers] Gimbal Lock?
>
>
>
> What you are most likely running into is that the view up vector and the
> view direction vector are becoming the same.  To reach 90 degrees, do it in
> two stages and regenerate the view up vector after each stage.
>
> - Wes
>
> On Wed, Apr 14, 2010 at 7:56 PM, Robbie Banks <robbie.banks at gmail.com>
> wrote:
>
> I’m just wondering if there is a gimbal lock issue with the vtkCamera on
> Elevation(double)??
>
>
>
> I have a 3D object which I am rotating using Elevation(), Azimuth() and
> Roll() to incrementally rotate using directional push buttons. This works
> fine for the Azimuth and Roll, but seems to lock on the Elevation when it
> hits 90 degrees.
>
>
>
> Is this a known problem?
>
>
>
> Robbie
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
>
> --
> Wesley D. Turner, Ph.D.
> Kitware, Inc.
> Technical Leader
> 28 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4920
>
>
>
>
> --
> Wesley D. Turner, Ph.D.
> Kitware, Inc.
> Technical Leader
> 28 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4920
>



-- 
Wesley D. Turner, Ph.D.
Kitware, Inc.
Technical Leader
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4920
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100415/67c1fae6/attachment.htm>


More information about the vtkusers mailing list