reedbeta at September 18th, 2011 14:32 — #1
I wrote a blog post about rotation matrices and how they can be derived using a mathematical technique called an "infinitesimal generator", and I use it to figure out the nasty formula for axis-angle rotations from first principles. Maybe some people here will be interested in this...warning, heavy mathematics ahead! :yes:
roel at September 18th, 2011 14:46 — #2
geon at September 18th, 2011 16:34 — #3
Just a question; In what situation would a axis-and-angle be a suitable representation of a rotation?
I usually store quaternions, since they are easy to use, and use angle-axis for input since they are easy to visualize.
reedbeta at September 18th, 2011 17:02 — #4
Yes, quaternions have several advantages as an internal representation of rotation for a physics engine or computer graphics. The axis-angle thing was more of an exercise to demonstrate what you can do with infinitesimal generators. Although, for angular velocity one usually uses a vector whose direction is the axis and length is the rotation speed, as the dynamics equations are easier that way. That's kind of like axis-angle.
oisyn at September 18th, 2011 17:46 — #5
Another way to derive the rotation matrix is using quaternions. A quaternion multiplication can be rewritten into a multiplication of a matrix and a quaternion as vector4. And since a point p rotated by quaternion q can be calculated by doing q∙quat(0, p)∙q-1, you can figure out the rotation matrix.
smile_ at September 19th, 2011 08:14 — #6
The same infinitesimal math can be applied to quaternions. Generator of quaternion rotation about axis identified by unit vector n is
G = quat(0, n) / 2.
So, for finite angle a, quaternion of rotation equals
q = exp(G*a*) = quat(cos(a / 2), n sin(a / 2)).