Orientation and Transformations
We consider the problem of the coordinate transformation about a rotation axis.
Euler's theorem:
Every spatial rotation leaves a line of fixed points: the rotation axis.
Rodrigues formula:
Given point x, decompose into components parallel and perpendicular to the rotation axis;
![]()

Figure 1
Only
the perpendicular component
is
affected by the rotation, yielding Rodrigues formula:
![]()
Substituting the cross product matrix n into Rodrigues formula:
![]()
Factoring out x we obtain:
![]()
That is Rodrigues formula in matrix form:

with
.
A rotation in n-dimensional space leaves invariant a n-2 dimensional subspace. In two dimensions an invariant is a point; in three dimensional space a line is invariant after an arbitrary rotation etc. If we assume that the n-2 dimensional invariant space can be described by the n-2 basis vectors e1,…,en-2 then a rotation around an angle a can be described by a matrix:
![]()
where P is a skew symmetric matrix
Given an axis u = (u1,u2,u3) then a rotation of a vector w around this axis by an angle a can be described by the transformation matrix R, see Fig 2(a),
![]()
where Ä denotes the tensor product. Eq. (I.1) is equivalent with Eq. (1), with matrix elements
![]()

P is a skew symmetric matrix formed by the elements of u, called the dual to u matrix.
dij is the Kronecker delta symbol and eijk the anti-symmetric permutation tensor.
The angle a and the rotation axis u can be obtained from the trace of R and its transposed matrix RT using the Equations (I.5) and (I.6).
![]()

![]()
Fig. 2(b) shows the derivation of Equation (I.1). We consider the components of w parallel and perpendicular to u, w|| and wT respectively. The term uÄu = uuT describes the projection w|| of w onto u which remains unchanged after a rotation around u. (1-uuT) describes the projection of w onto the plane on which u is perpendicular and P describes a projection of w onto the plane where u’s is normal. This operation is followed by an additional rotation by an angle p/2.
Given a transformation matrix R we can determine the corresponding rotation axis u from P using Eq. (I.6), whereas the corresponding rotation angle is given by Equation (I.5). If R-RT = 0 then the rotation angle is 0 or p and the rotation axis can be obtained from R. In this case it follows that R has as diagonal matrix elements the following:
![]()


Figure 2 (a) Rotation of a vector w around an arbitrary axis u by an angle a. (b) Components of w in the plane which is perpendicular to the rotation axis u after the rotation.
Optimal Orientation
We consider the problem of the determination of a direction vector u which optimizes some utility function f(u, ...), where f can depend on additional parameters some of which are direction dependent.
In three-dimensional space the invariant can be viewed as a rotation axis u = (u1, u2, u3). Using spherical coordinates this vector u can be specified using the spherical angles (j,q) i.e. u = (u1,u2,u3) = (sin(q)cos(j), sin(q)sin(j), cos(q)) and the utility function f depends on the three parameters (j,q,a). Given a direction u the angle which optimizes the utility function along this direction can be determined. The search in the q direction actually is a search in cosq which ensures that the angular space is uniformly searched. In order to escape from local minima we introduced a grid search method using a multi-scale approach. From the current search position new directions specified by a grid of a specified size and a given grid size are searched for a possible better solution. If a better solution is found on one of these grid points, then the search is repeated on a grid in a smaller part of space with a smaller grid constant around the previously found minimum. This process is repeated a few times.
Such a problem is the minimum bounding box problem. Find the orientation of a bounding box of a set of points with a minimum volume. That is the orientation of a bounding box that as tight as possible encloses a set of points.