Computer Graphics 1996

Exercises on Projections

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. Suppose the Centre of Projection is at (0,0,-1) and the viewplane is the plane z = 0. Let (x,y,z) be any point.

  1. By using the similar triangle method, find the projection of (x,y,z) on the viewplane.

  2. Consider the straight line ray from (0,0,-1) to the point (x,y,z). Write down the parametric equation of this line, and find where it intersects the plane z = 0. This provides another method for computing the projected point.

2. Suppose there is a pyramid centered at the origin, with base coordinates at (1,0,0), (0,1,0), (-1,0,0), (0,-1,0) and of height 2. Define viewing parameters so that the projection of the pyramid will be:

  1. a square with a diagonal cross;

  2. an isosceles triangle

  3. exactly two of the triangular faces would be seen

3. Suppose we have the following specification for a view:

VRP = (0,0,0)
VPN = (1,1,0)
VUV = (0,0,1)

Find the matrix M that transforms points from WC to VC.

4. A camera is oriented so that it is "looking" along the line joining (x0,y0,z0) to (x1,y1,z1). The VUV is (0,0,1). The camera is to move along this line starting from (x0,y0,z0) until it reaches the other end, in N equal steps, taking a "shot" at the starting point and then at each step. Write a fragment of code to capture such a sequence of views.

5*. This is similar to the previous question. The camera is to move completely around a unit circle which is centred at the origin, at height h, and the orientation of the view is such that the camera is always "looking" at the origin. Write a fragment of code to capture such a sequence of views.