High-resolution Computer Graphics Using C pp 147-167 | Cite as

# Matrix Representation of Transformations in Three-dimensional Space

Chapter

## Abstract

Transformations of co-ordinate axes in two-dimensional space were introduced in chapter 4. An extension to three-dimensional systems is an essential step before we are able to proceed to projections of three-dimensional space onto the necessarily two-dimensional graphics viewport. As in the lower dimension, there are three basic transformations: translation of origin, change of scale and axes rotation; we will ignore all other transformations such as shear. Since we have already introduced the idea of matrix representation of transformations in two dimensions, we shall move directly to a similar representation of three-dimensional transformations. It should once more be noted that certain graphics devices will have these operations in hardware. The techniques are, nevertheless, very important so a full description is given. Again the square matrices representing the transformations will be one dimension greater than the space — that is, 4×4 (remember a 4 × 4 matrix is stored in a double [5] [5] array!) — and a general point in space will be represented by, a column vector, relative to some triad of co-ordinate axes
We start with our library of functions used for creating the matrices representing three-dimensional transformations. These will be stored as a file “matrix3.c”, which in turn #includes “graphlib.c” (and hence “primitiv.c”) and two-dimensional utility functions in “utility.c”. It is given in listing 7.1.

$$\left( \begin{gathered} x \hfill \\ y \hfill \\ z \hfill \\ 1 \hfill \\ \end{gathered} \right)$$

### Keywords

Torque Triad## Preview

Unable to display preview. Download preview PDF.

## Copyright information

© Ian O. Angell 1990