[fluxus] quaternions

Artem Baguinski artm at v2.nl
Thu Apr 13 07:03:09 PDT 2006


cool !

quaternions are handy for skeleton animations (to represent rotations of bones)

i'm figuring out cal3d for work now, which is a skeleton animation
library. could be a nice addition to fluxus (with a way to generate
skeletons and attach them to meshes programmatically). but even
without extrernal library some simple version of skeleton animation is
probably doable in scheme already!

On 13/04/06, Dave Griffiths <dave at pawfal.org> wrote:
> are now availible to fluxus scripts (thanks to Artem for putting them in
> in the first place)
>
> qaxisangle : builds a quat with a rotation axis and angle in degrees
> qmul : returns two quats multiplied
> qnormalise : returns the normalised quat
> qtomatrix : returns the rotation matrix for the quaternion
>
> rotate and mrotate now accept quats, which are just vectors with 4
> elements. mainly of use in the form:
>
> (push)
> ; rotate 45 degrees around the axis specified (which will be normalised)
> (rotate (qaxisangle (vector 1 1 0) 45))
> (build-cube)
> (pop)
>
> which is the kind of thing I need em for right now, but we should probably
> add more functions to create and manipulate them as and when.
>
> I also fixed an ancient memory bug in rotate which could have been the
> cause of spurious crashes!!
>
> happy rotations,
>
> dave
>
>



More information about the Fluxus mailing list