Rotate around Z?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Rotate around Z?

nophead
Is there a way to rotate around the Z axis with the mouse? I only seem to be able to do X & Y.
Reply | Threaded
Open this post in threaded view
|

Re: Rotate around Z?

Triffid Hunter
holding shift swaps the axes of rotation around

would still love a quaternion-based arbitrary rotation viewport, let Marius et.al know if you happen to have one in your bookmarks :)

On Wed, Feb 1, 2012 at 9:29 AM, nop head <[hidden email]> wrote:
Is there a way to rotate around the Z axis with the mouse? I only seem to be able to do X & Y. 
Reply | Threaded
Open this post in threaded view
|

Re: Rotate around Z?

nophead


On 31 January 2012 23:52, Triffid Hunter <[hidden email]> wrote:
holding shift swaps the axes of rotation around
Thanks, I thought I had tried that but somehow I missed it. 

would still love a quaternion-based arbitrary rotation viewport, let Marius et.al know if you happen to have one in your bookmarks :)
I am not sure what you you mean. It seems to rotate about the centre of the view, so to rotate about an arbitrary point you can translate that to the centre. All 3D rotates seem a bit clumsy in 2D in my experience. 


On Wed, Feb 1, 2012 at 9:29 AM, nop head <[hidden email]> wrote:
Is there a way to rotate around the Z axis with the mouse? I only seem to be able to do X & Y. 

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad


Reply | Threaded
Open this post in threaded view
|

Re: Rotate around Z?

Triffid Hunter
On Wed, Feb 1, 2012 at 11:00 AM, nop head <[hidden email]> wrote:
would still love a quaternion-based arbitrary rotation viewport, let Marius et.al know if you happen to have one in your bookmarks :)
I am not sure what you you mean. It seems to rotate about the centre of the view, so to rotate about an arbitrary point you can translate that to the centre. All 3D rotates seem a bit clumsy in 2D in my experience. 

no that's not what I meant. I enjoy the viewport rotation about its own independent origin, and actually complained when that changed temporarily!

Rather, I'm looking to avoid gimbal lock- eg if you go into top view, dragging left and right still rotates about Z, you have to use shift to rotate about viewport-Y when I intuitively expect this to happen without any intervention. When viewing from arbitrary angles and wanting to move to a different arbitrary angle it can require quite a lot of stuffing around to get the viewport pointed in the right direction.

A quaternion-based rotation eliminates this problem as it isn't susceptible to gimbal lock.


For those of you who don't already know, Euler rotations express a rotation in terms of pitch, roll and yaw, familiar terms from aircraft. However if the aircraft is doing a nosedive (ie its local Y axis is aligned to global Z), relative to an observer what's the difference between roll and yaw? Any time you apply multiple rotations in some order you can run into this problem. There is plenty of literature around relating to gimbal lock if you want a more in-depth explanation or better examples.

A Quaternion rotation expresses a single rotation about an arbitrary vector (after some number-munging anyway) rather than 3 rotations about the cartesian axes. As such it essentially references a local coordinate space which can be oriented relative to the viewport rather than using the global XYZ axes for rotations.


It probably won't be for everyone (it's easy to get lost in the rotations) but if I had /that/ when I held shift or some other modifier instead of rotating XY instead of XZ I'd be a happy clam :)