[fluxus] quaternions
Dave Griffiths
dave at pawfal.org
Thu Apr 13 06:44:46 PDT 2006
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