C327 Computer Graphics

Revision Questions

There are five questions on the exam and you must answer three.

There are six revision questions below.

1.

(a) Describe polygon fill algorithms for non-zero winding number and odd-even rules.

(b) Suppose there is an object described as the set-difference of two objects A-B where A is a diamond shape (ie, 45 degree rotated square) centred at the origin, with side length 2, and B is the same shape but with side length 1. Describe in detail an algorithm for scan-filling such a shape.

2.

(a) Give the parametric equations that define each of the following objects, in 3D space:

(i) a line segment between p0 and p1

(ii) a circle of height c, with centre (a,b) and radius r

(iii) a square of height c, and corners (-1,-1,c), (1,-1,c), (1,1,c) and (-1,1,c).

(b) Using the usual camera parameters and associated functions (eg, setVRP is such a function) determine the following camera paths:

(i) moving along the line segment from p0 to p1 with the up-direction of the starting camera upright (ie, in the positive z direction) but gradually changing so that by the end of the path it is in the positive x direction. The camera should always be looking along the path from p0 to p1.

(ii) moving around the circle, always looking in towards the origin, with the up direction the same as positive z.

(iii) moving around the square, same conditions as (ii).

(iv) moving around the square but always looking in the direction of movement.

3.

(a) Describe in detail the rendering phase of the graphics pipeline that incorporates both shading and hidden surface removal.

(b) Suppose there is a pyramid with a square base of side length 2 centred at the origin (ie, one of the sides is (-1,-1,0) to (1,-1,0)) and it has height 1 (ie, the apex is (0,0,1)). Find the plane equation of the side of the pyramid that has its bottom edge on the x-axis.

(c) Using the result in (b) discuss in detail how you would carry out the following kinds of shading for the pyramid:

(i) flat shading

(ii) flat shading but using Lambert's Law

(iii) Gouraud Shading

You may assume that there is a pure white directional light source with direction vector (0,0,1), that ambient light is black, and that the pyramid is a pure red diffuse reflector.

(d) Suppose that the pyramid were a polygon approximation to a semi-ellipsoid. How would you carry out Phong shading in this case?

4.

(a) What is meant by a ray-tracing acceleration technique, and describe three such techniques.

(b) Describe the ray tracing algorithm, and in particular discuss how each of the acceleration techniques mentioned in (a) would be incorporated into the algorithm.

(c) Suppose the scene consisted entirely of different instances of the pyramids described in the previous question, though each were specularly reflecting and transmitting surfaces. How would you ray trace such a scene?

5.

(a) What is meant by clipping, what role does it play in the 3D graphics pipeline?

(b) Describe a clipping algorithm that will clip a 3D planar polygon to an axis aligned cube. Under what circumstances could such a clipping algorithm be used in the 3D graphics pipeline?

(c) Why cannot polygon clipping, in the case of (b) be achieved by repeated use of the Cohen-Sutherland line clipping algorithm?

6.

(a) Give the meaning of each of the following terms: Modelling or Object Coordinates, World Coordinates, Viewing or Camera Coordinates, Image or Projection Space.

(b) Describe in detail each of the BSP tree and Z-buffer algorithms for hidden surface removal, being careful to state in which of the above spaces the algorithms "naturally" operate.

(c) For each of these two algorithms discuss whether and how it might be possible to implement them entirely in each of the other spaces (i.e., those not "natural" for that algorithm - eg, the Z-buffer in World Coordinates) and the possible advantages/disadvantages of doing so.