Tables for
Volume B
Reciprocal space
Edited by U. Shmueli

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

Section Compound transformations

R. Diamonda*

aMRC Laboratory of Molecular Biology, Hills Road, Cambridge CB2 2QH, England
Correspondence e-mail: Compound transformations

| top | pdf |

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

We note first that any [4 \times 4] matrix of the form [\pmatrix{{U{\bi R}} &{\bf V}\cr {\bf 0}^{T} &{W}\cr},] with U a scalar, may be factorized according to [\pmatrix{{U{\bi R}} &{\bf V}\cr {\bf 0}^{T} &{W}\cr} \simeq \pmatrix{{U{\bi I}} &{\bf 0}\cr {\bf 0}^{T} &{W}\cr} \pmatrix{{U{\bi I}} &{\bf V}\cr {\bf 0}^{T} &{U}\cr} \pmatrix{{U{\bi R}} &{\bf 0}\cr {\bf 0}^{T} &{U}\cr}] and also that multiplying [\pmatrix{{U{\bi R}} &{\bf V}\cr {\bf 0}^{T} &{W}\cr}] 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 [\pmatrix{{W{\bi R}}^{T} &{{\bi -R}^{T}{\bf V}}\cr {\bf 0}^{T} &{U}\cr}] 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 [\pmatrix{{N{\bi R}} &{\bf 0}\cr {\bf 0}^{T} &{N}\cr}] is a rotation matrix as in Section[link], its application produces a rotation about an axis through the origin defined only in the space in which it is applied. For example, if [\displaylines{{\bi R} = \pmatrix{\cos \theta &\sin \theta &0\cr -\sin \theta &\cos \theta &0\cr 0 &0 &1\cr},\cr \noalign{\vskip3pt} {\bi T}' \pmatrix{{\bf X}\cr {W}\cr} = {\bi T} \pmatrix{{N{\bi R}} &{\bf 0}\cr {\bf 0}^{T} &{N}\cr} \pmatrix{{\bf X}\cr {W}\cr}}] rotates the image about the z axis of data space, whatever the prevailing viewing transformation, T.

Forming [\pmatrix{{N{\bi R}} &{\bf 0}\cr {\bf 0}^{T} &{N}\cr} {\bi T} \pmatrix{{\bf X}\cr {W}\cr}] 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[link], must place the origin of display space there by setting [F\gt S = R + L = T + B = 0\gt N], in the notation of that section.

If a rotation is to be about a point [\pmatrix{{\bf V}\cr {N}\cr}] then [\eqalign{{\bi T}' =& \pmatrix{{N{\bf I}} &{\bf V}\cr {\bf 0}^{T} &{N}\cr} \pmatrix{{N'{\bi R}} &{\bf 0}\cr {\bf 0}^{T} &{N}'\cr} \pmatrix{{N{\bi I}} &-{\bf V}\cr {\bf 0}^{T} &{N}\cr} {\bi T}\cr \simeq &\pmatrix{{N{\bi R}} &{\bf V} - {{\bi R}{\bf V}}\cr {\bf 0}^{T} &{N}\cr} {\bi T}}] or [\eqalign{{\bi T}' =& {\;\bi T} \pmatrix{{N{\bi I}} &{\bf V}\cr {\bf 0}^{T} &{N}\cr} \pmatrix{{N'{\bi R}} &{\bf 0}\cr {\bf 0}^{T} &{N}'\cr} \pmatrix{{N{\bi I}} &-{\bf V}\cr {\bf 0}^{T} &{N}\cr} \cr\simeq &{\;\bi T} \pmatrix{{N{\bi R}} &{\bf V} - {{\bi R}{\bf V}}\cr {\bf 0}^{T} &{N}\cr}}] 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 [\pmatrix{{\bf V}\cr {N}\cr} = {\bi T} \pmatrix{{\bf U}\cr {W}\cr}] for a rotation centre at [\pmatrix{{\bf U}\cr {W}\cr}] 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[link]

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 [{\bi T}' = {\bi T}_{1} {\bi T} = {\bi TT}_{2},] where [{\bi T}_{1}] is the required alteration to the prevailing viewing transformation T and [{\bi T}_{2}] is the data-space equivalent, [\eqalignno{ {\bi T}_{2} = {\bi T}^{-1} {\bi T}_{1} {\bi T} &= \pmatrix{U{\bi R} &{\bf V}\cr {\bf 0}^{T} &{W}\cr}^{-1} \pmatrix{U_{1}{\bi R}_{1} &{\bf V}_{1}\cr {\bf 0}^{T} &{W}_{1}\cr} \pmatrix{U{\bi R} &{\bf V}\cr {\bf 0}^{T} &{W}\cr}\cr &\simeq \pmatrix{UU_{1}{\bi R}^{T}{\bi R}_{1}{\bi R} &{\bi R}^{T}(U_{1}{\bi R}_{1}{\bf V} + {W}{\bf V}_{1} - {\bi W}_{1}{\bf V})\cr {\bf 0}^{T} &U{W}_{1}\cr}.}]

An important special case is when [{\bi T}_{1}] is to effect a rotation about the origin of display space without change of scale, so that [{\bf V}_{1} = 0, U_{1} = W_{1} = {W}], for then [{\bi T}_{2} \simeq \pmatrix{U{\bi R}^{T}{\bi R}_{1}{\bi R} &{\bi R}^{T}({\bi R}_{1} - {\bi I}){\bf V}\cr {\bf 0}^{T} &U\cr}.]

If r is the required axis of rotation of [{\bi R}_{1}] in display space then the axis of rotation of [{\bi R}^{T}{\bi R}_{1}{\bi R}] in data space is [{\bf s} = {\bi R}^{T}{\bf r}] since [{\bi R}^{T}{\bi R}_{1}{\bi R}{\bf s} = {\bf s}]. This gives a particularly simple result if [{\bi R}_{1}] is to be a primitive rotation for then s is the relevant row of R, and [{\bi R}^{T}{\bi R}_{1}{\bi R}] can be constructed directly from this and the required angle of rotation.

to end of page
to top of page