Re: [K3d-development] Strange behavior when rotating object
Brought to you by:
barche
From: Timothy M. S. <ts...@k-...> - 2004-03-31 17:52:41
|
Giuseppe Zompatori wrote: > Anders Dahnielson ha wrote: > >>Try rotate (orient) an object around the Y axis in either positive or >>negative direction using the spinbutton. After 90 degrees; 91 degrees Y >>will become X 180, Y 89 and Z 180, resulting in a jump back and forth >>between Y 89 and 90 degrees when using the spinbutton. > Sounds like the infamous "gimbal lock". Yup, that's what that it is. Internally, we use an Angle-Axis representation of orientation for objects, see: http://k3d.sourceforge.net/cgi-bin/wiki?RepresentingRotations Angle-Axis does not have a problem with gimbal lock, but we are converting back-and-forth to Euler angles in the UI layer, which causes the same problem (actually, it may exacerbate the problem). I'd be interested to hear some thoughts on how other apps handle this issue - my assumption is that they either suffer from gimbal lock or offer alternate ways to specify orientation in the UI. I have it in mind that we may need to offer multiple ways to pick an angle (this would be analogous to the multiple methods for picking a color in the Gimp). It may-or-may-not be that our Euler <-> Angle-Axis conversion could be improved, as well. Cheers, Tim |