Blog post about deriving rotation matrices

Reedbeta 167 Sep 18, 2011 at 18:32

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:

5 Replies

Please log in or register to post a reply.

roel 101 Sep 18, 2011 at 18:46


geon 101 Sep 18, 2011 at 20:34


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 167 Sep 18, 2011 at 21:02

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 101 Sep 18, 2011 at 21:46

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_ 101 Sep 19, 2011 at 12:14

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(Ga) = quat(cos(a / 2), n sin(a / 2)).