Computer Graphics 1996

Exercises on 3D Transformations

Answers to some of these exercises are available.

These are for the exercise classes. Questions that have a * besides them are more difficult and should be considered at some time, but not necessarily now.

1. Write down 4*4 matrices for each of the following:

  1. To translate by the vector (1,2,3)

  2. To scale with respect to the origin by the amount (2,4,6)

  3. To rotate around the z-axis by 45 degrees (note sin 45 = cos 45 = 1/sqrt(2))

  4. To rotate around the x-axis by 45 degrees.

2. Find the 4*4 transformation matrices in order to accomplish:

  1. Scaling an object with respect to the origin by 2 in x, y and z followed by a translation by (1,1,1).

  2. Translation of an object by (1,1,1) followed by a scaling with respect to the origin by 2 in x, y and z.

Why are the two matrices different?

3. Find a matrix that will do a scale by (a,b,c) with respect to the point (x,y,z).

4. The transpose of a matrix with elements a[i,j] is the matrix with elements a[j,i]. (I.e., the rows become columns and the columns become rows). An orthogonal matrix is one which when multiplied by its transpose results in the identity matrix. Hence, the transpose is also the inverse of such a matrix. Amongst the various matrices (translation, scaling, rotation about X, Y and Z axes) - which are orthogonal?

5*. A matrix is specified in generic form as follows:


r 	r 	r 	0
r 	r 	r 	0
r 	r 	r 	0
a 	b 	c 	1

The r-values are not all equal, but denote a 3*3 sub-matrix that is orthogonal. Hence this entire matrix can be expressed as:
R 0
q 1
where R is the orthogonal 3*3 matrix, q is the vector (a,b,c), 0 is a 3*1 column vector of 0s. Find an expression for the inverse of this matrix.

6*. Suppose we have a plane (P) with equation ax + by + cz = d, and we wish to transform this plane by the 4*4 matrix A. Find a new plane equation, in terms of a,b,c and d, and the matrix A, that refers to the plane formed by transforming every point on P by matrix A.