(a) Why exactly does Gouraud shading produce an unsatisfactory
answer for light sources which are close to a polygon relative to its
(b) Suppose we have a unit cube centered at the origin, (ie, two
opposite corners are (-0.5,-0.5,-0.5) and (0.5,0.5,0.5)). There is a light
source at (a,b,c). Generate a formula for finding the colour reflected
at any point (x,y,z) on the top surface of the cube, assuming that
there is diffuse reflection. (Define any additional terms or notation
that you introduce).
(c) What would happen if (a,b,c) were inside the box?
(d) How does the answer in (b) change if a specular reflection model is
(a) Describe in detail the Cohen-Sutherland clipping algorithm for
clipping a line segment (x1,y1,z1) to (x2,y2,z2) to a 3D canonical
viewing volume specified as follows: the COP is at (0,0,0) and the
clipping planes are x = ąz and y = ąz (there are no front and back
(b) The following specifies an alternative view volume: the COP is at
(0,0,0), the view plane distance is 1, and the view plane window has
vertices (1,0,1), (1,1,1) and (-1,0,1). Explain in detail how the
Sutherland-Hodgman polygon clipping algorithm would work
with this clipping region.
a) The cylinder in (1) below is centred at the origin as shown. It is
drawn without hidden surface removal. Give viewing parameters
sufficient to obtain the views (2), (3) and (4). You may ignore the
view plane window and clipping plane parameters.
b) In a perspective projection, the observer's eye is at (1,1,1) and s/he
is looking towards the origin. The viewplane is one unit distance
from the observer's position, and between the observer and the
origin. In the image the positive Z axis is required to be pointing
vertically upward. Find the appropriate camera model parameters
(VRP,VPN, VUV, COP) for this view.
c) Construct the matrix which transforms from World Coordinates to
Viewing Coordinates, for this view. and hence find a formula
giving the projection of the world coordinate point (x,y,z) onto the
(a) The diagram below shows a plan view of a strange room with
outside walls 1,2,3,4 and a "hole" demarcated by a,b,c,d. (Ignore the
line AB, the points C, P1 and P2). Find a BSP tree to represent this
(b) Point P1 is inside the room and point P2 is outside. Show how the
BSP tree can be used to determine for any point whether it is inside
or outside the room.
(c) Use the BSP tree traversal algorithm to obtain the back-to-front order of
polygons from position C.
(d) Line AB represents a path that a robot plans to take from A to B. It
is required to know in advance which parts of this path will be
inside and which outside the room. Show how to use the BSP tree
to find these parts of line AB.
(e) In general compare the BSP hidden surface algorithm with the z-
buffer algorithm, stating the advantages and disadvantages of
This may not be included, depending on time
5. (a) The diagram below shows a 2D analog of part of a ray traced scene. There are six "surfaces" A,B,C,D,E,F and a number of rays are shown. Based on the behaviour of the rays at the surfaces, identify the kind of reflective property which each surface has.
(b) Write a program showing the main recursive ray tracing function.
(c) Suppose the scene consists entirely of convex polyhedra. Taking
into account the fact that the greatest amount of time in ray tracing
is taken up by intersection calculations, describe in detail how you
would test whether a ray intersected a given polyhedra.
(d) How would you find the intersection point between a ray and a