No, I'm looking to apply one quaternion to another in the same manner you'd multiply two matrices together.
i.e. if I have a quaternion pointing along the x axis and I rotate it by a quaternion that represents a 90 degree rotation about the y axis, the result should be a quaternion pointing along the z axis. See what I mean?
The method I'm using now (normalizing and multiplying) only works for small rotations (< 1 radian) and isn't accurate across cumulative rotations (i.e. rotating 0.01 radians 314 times is visibly off the 180 degree rotation).
The specific problem: users will be writing code for entities who's facing is described by a quaternion, and their only interface to modifying that quaternion is a rotate method that accepts a quaternion as a paramter:
public void rotate(float x, float y, float z, float w)
yes, it's Java but don't worry, the body is implemented in C.
Basically, if the user calls rotate(0.0f, 1.0f, 0.0f, 180.0f) then the entity should do an about face. An acceptable alternative method would be to call a rotate(x,y,z) method, where x,y,z specify the axis of rotation, and the magnitude of <x,y,z> specifies the amount of rotation.
I know my current method works for small rotations, because these balls:
http://www.rit.edu/~dmp9199/pics/roller.JPG
use it to spin about the vector normal to their velocity and the triangle they're rolling over, but it doesn't work for large rotations, as the limit of actual rotation as supplied parameters approach infinity is +/-90 degrees.
Perhaps a book would be helpful? Any suggestions?