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

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

## Section 3.3.1.1. Coordinate systems, notation and standards

R. Diamonda*

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

| top | pdf |

#### 3.3.1.1.1. Cartesian and crystallographic coordinates

| top | pdf |

It is usual, for purposes of molecular modelling and of computer graphics, to adopt a Cartesian coordinate system using mutually perpendicular axes in a right-handed system using the ångström unit or the nanometre as the unit of distance along such axes, and largely to ignore the existence of crystallographic coordinates expressed as fractions of unit-cell edges. Transformations between the two are thus associated, usually, with the input and output stages of any software concerned with modelling and graphics, and it will be assumed after this section that all coordinates are Cartesian using the chosen unit of distance as the unit of coordinates. For a discussion of coordinate transformations and rotations without making this assumption see Chapter 1.1 in which formulations using co- and contravariant forms are presented.

The relationship between these systems may be written in which X and x are position vectors in direct space, written as column vectors, with x expressed in crystallographic fractional coordinates (dimensionless) and X in Cartesian coordinates (dimension of length).

There are two forms of M in common use. The first of these sets the first component of X parallel to and the third parallel to c and is in which

ϕ is equal to the volume of the unit cell divided by abc, and is unchanged by cyclic permutation of α, β and γ and of , and . The Cartesian and crystallographic axes have the same chirality if the positive square root is taken.

The second form sets the first component of X parallel to a and the third component of X parallel to and is

A third form, suitable only for rhombohedral cells, is in which which preserves the equivalence of axes. Here the chiralities of the Cartesian and crystallographic axes are the same if p is chosen positive, and different otherwise, and the two sets of axes coincide in projection along the triad if q is chosen positive and are π out of phase otherwise.

#### 3.3.1.1.2. Homogeneous coordinates

| top | pdf |

Homogeneous coordinates have found wide application in computer graphics. For some equipment their use is essential, and they are of value analytically even if the available hardware does not require their use.

Homogeneous coordinates employ four quantities, X, Y, Z and W, to define the position of a point, rather than three. The fourth coordinate has a scaling function so that it is the quantity (as delivered to the display hardware) which controls the left–right positioning of the point within the picture. A point with is in the picture, normally, and those with are outside it, but see Section 3.3.1.3.5.

There are many reasons why homogeneous coordinates may be adopted, among them the following:

 (i) X, Y, Z and W may be held as integers, thus enabling fast arithmetic whilst offering much of the flexibility of floating-point working. A single W value may be common to a whole array of X, Y, Z values. (ii) Perspective transformations can be implemented without the need for any division. Only high-speed matrix multiplication using integer arithmetic is necessary, provided only that the drawing hardware can provide displacements proportional to the ratio of two signals, X and W or Y and W. Rotation, translation, scaling and the application of perspective are all affected by operations of the same form, namely multiplication of a four-vector by a matrix. The hardware may thus be kept relatively simple since only one type of operation needs to be provided for. (iii) Since kX, kY, kZ, kW represents the same point as X, Y, Z, W, the hardware may be arranged to maximize resolution without risk of integer overflow.

For analytical purposes it is convenient to regard homogeneous transformations in terms of partitioned matrices where M is a matrix, V and X are three-element column vectors, U is a three-element row vector and N and W are scalars.

Matrices and vectors which are equivalent under the considerations of (iii) above will be related by the sign ≃ in what follows.

Hardware systems which use true floating-point representations have less need of homogeneous coordinates and for these N and W may normally be set to unity.

#### 3.3.1.1.3. Notation

| top | pdf |

In this chapter the conventions of matrix algebra will be adhered to except where it is convenient to show operations on elements of vectors, matrices and tensors, where a subscript notation will be used with a modified summation convention in which summation is over lower-case subscripts only. Thus the equation is to be read `For any I, is summed over j'.

Subscripts using the letter i or later in the alphabet will relate to the usual three dimensions and imply a three-term summation. Subscripts a to h are not necessarily so limited, and, in particular, the subscript a is used to imply summation over atoms of which there may be an arbitrary number.

We shall use the superscript T to denote a transpose, and also use the Kronecker delta, , which is 1 if and zero otherwise, and the tensor which is 1 if I, J and K are a cyclic permutation of 1, 2, 3, −1 if an anticyclic permutation, and zero otherwise.

A useful identity is then Single modulus signs surrounding the symbol for a square matrix denote its determinant, and around a vector denote its length.

The symbol ≃ is defined in the previous section.

#### 3.3.1.1.4. Standards

| top | pdf |

The sections of this chapter concerned with graphics are primarily concerned with the mathematical aspects of graphics programming as they confront the applications programmer. The implementations outlined in the final section have all, so far as the author is aware, been developed ab initio by their inventors to deal with these aspects using their own and unrelated techniques and protocols. It is clear, however, that standards are now emerging, and it is to be hoped that future developments in applications software will handle the graphics aspects through one or other of these standards.

First among these standards is the Graphical Kernel System, GKS, defined in American National Standards Institute, American National Standard for Information Processing Systems – Computer Graphics – Graphical Kernel System (GKS) Functional Description (1985) and described and illustrated by Hopgood et al. (1986) and Enderle et al. (1984). GKS became a full International Standards Organization (ISO) standard in 1985, and its purpose is to standardize the interface between application software and the graphics system, thus enhancing portability of software. Specifications for Fortran, Pascal and Ada formulations are at an advanced stage of development. Its value to crystallographers is limited by the fact that it is only two-dimensional. A three-dimensional extension known as GKS-3D, defined in International Standards Organisation, International Standard Information Processing Systems – Computer Graphics – Graphical Kernel System for Three Dimensions (GKS-3D), Functional Description (1988) became an ISO standard in 1988. Perhaps of greatest interest to crystallographers, however, is the Programmers' Hierarchical Interactive Graphics System (PHIGS) (Brown, 1985; Abi-Ezzi & Bunshaft, 1986) since this allows hierarchical segmentation of picture content to exist in both the applications software and the graphics device in a related manner, which GKS does not. Some graphics devices now available support this type of working and its exploitation indicates the choice of PHIGS. Furthermore, Fortran implementations of GKS and GKS-3D require points to be stored in arrays dimensioned as X(N), Y(N), Z(N) which may be equivalenced (in the Fortran sense) to XYZ(N, 3) but not to XYZ(3, N), which may not be convenient. PHIGS also became an International Standard in 1988: American National Standards Institute, American National Standard for Information Processing Systems – Computer Graphics – Programmer's Hierarchical Graphics System (PHIGS) Functional Description, Archive File Format, Clear-Text Encoding of Archive File (1988). PHIGS has also been extended to support the capability of raster-graphics machines to represent reflections, shadows, see-through effects etc. in a version known as PHIGS+ (van Dam, 1988).

Increasingly, manufacturers of graphics equipment are orienting their products towards one or other of these standards. While these standards are not the subject of this chapter it is recommended that they be studied before investing in equipment.

In addition to these standards, related standards are evolving under the auspices of the ISO for defining images in a file-storage, or metafile, form, and for the interface between the device-independent and device-dependent parts of a graphics package. Arnold & Bono (1988) describe the ANSI and ISO Computer Graphics Metafile standard which provides for the definition of (two-dimensional) images. The definition of three-dimensional scenes requires the use of (PHIGS) archive files.

### References

American National Standards Institute, American National Standard for Information Processing Systems – Computer Graphics – Graphical Kernel System (GKS) Functional Description (1985). ISO 7942, ISO Central Secretariat, Geneva, Switzerland.Google Scholar
American National Standards Institute, American National Standard for Information Processing Systems – Computer Graphics – Programmer's Hierarchical Graphics System (PHIGS) Functional Description, Archive File Format, Clear-Text Encoding of Archive File (1988). ANSI X3.144–1988. ANSI, New York, USA.Google Scholar
International Standards Organisation, International Standard Information Processing Systems – Computer Graphics – Graphical Kernel System for Three Dimensions (GKS-3D), Functional Description (1988). ISO Document No. 8805:1988(E). American National Standards Institute, New York, USA.Google Scholar
Abi-Ezzi, S. S. & Bunshaft, A. J. (1986). An implementer's view of PHIGS. IEEE Comput. Graphics Appl. Vol. 6, Part 2.Google Scholar
Arnold, D. B. & Bono, P. R. (1988). CGM and CGI: metafile and interface standards for computer graphics. Berlin: Springer-Verlag.Google Scholar
Brown, M. D. (1985). Understanding PHIGS. Template, Megatek Corp., San Diego, California, USA.Google Scholar
Dam, A. van (1988). PHIGS+ functional description, revision 3.0. Comput. Graphics, 22, 125–218.Google Scholar
Enderle, G., Kansy, K. & Pfaff, G. (1984). Computer graphics programming, GKS – the graphics standard. Berlin: Springer-Verlag.Google Scholar
Hopgood, F. R. A., Duce, D. A., Gallop, J. R. & Sutcliffe, D. C. (1986). Introduction to the graphical kernel system, 2nd ed. London: Academic Press.Google Scholar