International
Tables for
Crystallography
Volume B
Reciprocal space
Edited by U. Shmueli

International Tables for Crystallography (2006). Vol. B, ch. 3.3, pp. 371-372   | 1 | 2 |

## Section 3.3.1.3.8. Compound transformations

R. Diamonda*

aMRC Laboratory of Molecular Biology, Hills Road, Cambridge CB2 2QH, England
Correspondence e-mail: rd10@cam.ac.uk

#### 3.3.1.3.8. Compound transformations

| top | pdf |

In this section we consider the viewing transformation T of Section 3.3.1.3.1 and its construction in terms of translation, rotation and scaling, Sections 3.3.1.3.2 –4. We use T′ to denote a new transformation in terms of the prevailing transformation T.

We note first that any matrix of the form with U a scalar, may be factorized according to and also that multiplying by an isotropic scaling matrix, a rotation, or a translation, either on the left or on the right, yields a product matrix of the same form, and its inverse is also of this form, i.e. any combination of these three operations in any order may be reduced by the above factorization to a rotation about the original origin, a translation (which defines a new origin) and an expansion or contraction about the new origin, applied in that order.

If is a rotation matrix as in Section 3.3.1.3.3, its application produces a rotation about an axis through the origin defined only in the space in which it is applied. For example, if rotates the image about the z axis of data space, whatever the prevailing viewing transformation, T.

Forming rotates the image about the z axis of display space, i.e. the normal to the tube face under the usual conventions, whatever the prevailing T. Furthermore, if this rotation is to appear to be about some chosen position in the picture, e.g. the centre, then the window transformation U, Section 3.3.1.3.5, must place the origin of display space there by setting , in the notation of that section.

If a rotation is to be about a point then or according to whether R and V are both defined in display space or both in data space. If the rotation is defined in display space and the position of the centre of rotation is defined in data space, then the first form of T′ must be used, in which V is first computed from for a rotation centre at in data space.

For continuous rotations defined in display space it is usually worthwhile to bring the centre of rotation to the origin of display space and leave it there, i.e. to omit the left-most factor in the first expression for T′. Incremental rotations can then be made by further rotational factors on the left without further attention to V. When continuous rotations are implemented by repeated multiplication of T by a rotation matrix, say thirty times a second for a minute or so, the orthogonality of the top-left partition of T may become degraded by accumulation of round-off error and this should be corrected occasionally by one of the methods of Section 3.3.1.2.3.

It is sometimes a requirement, depending on hardware capabilities, to affect a transformation in display space when access to data space is all that is readily available. In such a case where is the required alteration to the prevailing viewing transformation T and is the data-space equivalent,

An important special case is when is to effect a rotation about the origin of display space without change of scale, so that , for then

If r is the required axis of rotation of in display space then the axis of rotation of in data space is since . This gives a particularly simple result if is to be a primitive rotation for then s is the relevant row of R, and can be constructed directly from this and the required angle of rotation.