Rationale

For any non-null complex number \(z\), it is possible to create an other complex number of modulus one:

In the particular case \(z = 1 + ti\), an algebraic parametrization of the circle appears:

Norman Wildberger suggests such transformation can and should be used to perform rotations in the plane, instead of using trigonometric functions (wikipedia article).

Can it also be done in 3D space? That is, for any two non-colinear vectors \(\mathbf{u}\) and \(\mathbf{v}\), how can we algebraically parametrize rotations in the \((\mathbf{u},\mathbf{v})\) plane?

We first write:

It is known, notably as pointed out by David Hestenes, that \(\mathbf{uv}\) behaves as a complex number, with \(\mathbf{u}\cdot\mathbf{v}\) being the real part and \(\mathbf{u}\wedge\mathbf{v}\) the imaginary one.

Thus we can verify that:

is of modulus one.

Therefore we can rotate any vector \(\mathbf{x}\) with a sandwich product:

If we do it for three vectors of an orthonormal basis, we get the coefficients of the orthogonal matrix representation.

Example

Say we are visualizing an object through a computer graphics interface such as WebGL. We want to write some code for rotating the object with the mouse. The mouse will move on the screen and we want to interpret this two-dimensional motion as a rotation.

For simplicity, we shall reason in the Normalized Device Coordinates (see for instance this) with \((\mathbf{i},\mathbf{j},\mathbf{k})\) as the orthonormal basis.

The motion of the mouse is thus:

We want to parametrize rotations that occur in the plane

If we want to obtain a similar expression as above, we should rather use the following basis:

Then we have:

Let's note:

and

Then

Which gives the matrix:

WebGL implementation

Below is a colored cube. It's the same that can be found on this WebGL tutorial. You should be able to rotate it with your mouse.

Apparently your browser does not support HTML5 canvas.