[Papervision3D] Quaternion rotation

Paper World worldofpaper at googlemail.com
Thu Mar 15 04:03:49 EST 2007


The 'unit' quaternion can be used as an axis-angle thingy. You have to keep
normalising to keep the axis you want to reference unit length otherwise it
all goes pear-shaped - but you can get some nice effects - especially with
particles when you use non unit-length axes of rotation - sometimes.

T

On 3/15/07, Patrick Juchli <patrick at lessrain.com> wrote:
>
>
> A quaternion is not exactly the same thing as angle-axis-rotation which
> you are referring to. Check out this article:
> http://www.gamasutra.com/features/19980703/quaternions_01.htm – I think
> it's a very good one.
>
> With quaternions you'll have to convert them back and forth to matrices
> for Papervision3D. But as we Flash people just love to apply tweening to
> everything, quaternions might be our friend since it lets you easily
> interpolate between to rotations (check the above article for SLERP).
>
> Patrick
>
>
> On 15.03.2007, at 02:00, Seb wrote:
>
> I feel like I'm just starting to understand quaternians, so I'm sure one
> of the geniuses here will correct me if I'm wrong :-)  A quaternian is made
> up of a rotation value and a 3 dimensional vector representing the axis of
> rotation. So if you want to apply this to the movement of the mouse you
> could set the rotation axis to the x axis (1,0,0), and the amount of
> rotation relative to the y position of the mouse. Then you could rotate the
> quaternian's rotation axis around the y axis relative to the mouse's x
> movement. IYSWIM!
>
> But I think this would probably be ok to do with euler angles?
>
> hope this helps
>
> Seb
>
> On 3/14/07, Joe McKeown < Joe.McKeown at origindesign.com> wrote:
> >
> > Pardon me if this has already been addressed but I have yet to find an
> > answer specific to PV3D.
> >
> > I'm trying to allow user interaction with a mouse to rotate a 3D object.
> > I'm limiting rotation to 2 axes: X & Y.  Euler rotations have the ugly
> > reality of gimbal lock so I'm exploring the use of Quaternion math to
> > handle the rotations.  There's plenty of info about the algorithms and
> > even some Actionscript implementations (e.g., Sandy's QuaternionMath
> > class) but I can't seem to get anything to work.  Generally, I can
> > follow the concepts and math but without a specific example/solution for
> > this problem I'm a bit lost.  My experimenting has proven frustrating
> > and I'm not sure where I'm going wrong.
> >
> > Does anyone have some input and/or direction as to translating 2D mouse
> > coordinates to 3D rotation of an object?
> >
> > Thanks,
> > Joe McKeown
> >
> > _______________________________________________
> > Papervision3D mailing list
> > Papervision3D at osflash.org
> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> >
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070315/464132b1/attachment.htm


More information about the Papervision3D mailing list