I’ve just uploaded a set of quaternion helper objects for Max. You
can find more info here:
OSX (UB) and Windows.
Quaternion helper objects. Convert between quaternion, Euler,
cartesian and axis/angle representations.
"Represent, store and transform a quaternion"
"The mul messsage, with a quaternion argument, rotates the stored
quaternion by the argument. bang outputs the stored value. reset sets
it to zero rotation. quat takes an optional int argument – how often
quaternions are normalized. Reduce to improve object efficiency, but
increase to avoid floating point error creeping into the angles.
Default every 30 operations."
Convert an axis/angle rotation (e.g. the output of jit.gl.handle) to
Convert Euler rotations (azimuth/elevation/tilt or heading/attitude/
bank or yaw/pitch/roll) to quaternion
Convert quaternion to axis/angle rotation (e.g. most jit.gl rotate
Select a unit vector in the quaternion rotation
quat2car returns a unit vector representing a principal axis of the
rotation, which can be useful to accumulate positions of moving
objects for example. Argument ‘x’, ‘y’, ‘z, ‘-x’, ‘-y’ or ‘-z’
specifies which axis is the ‘front’
Convert quaternion to Euler angles (azimuth/elevation/tilt or heading/
attitude/bank or yaw/pitch/roll). NOTE: there is a loss of
information in the conversion from quaternion to Euler angles. This
behaviour is matched by the original Shoemake algorithm.
Rotate a cartesian point by a quaternion
Wow. Thank you. Nice gift.
C74 RSS Feed | © Copyright Cycling '74