CSC418/2504F Fall 2001: Midterm Test:

Wednesday, October 31st, 2001, 7:00 PM

 

Family Name:_____________________________

 

First Name:    _____________________________

 

Student ID:    _____________________________

 

 

 

Instructions:

Attempt all questions.

There are five questions.

The total mark is 24.

 

          You have 60 minutes to complete the test.

 

Aids allowed: Calculators

Textbooks and notes are NOT allowed.

 

1:           /5

 

2:           /5

 

3:           /5

 

4:           /4

 

5:           /5

 

                  _________

 

     Total:                 /24


1.     Colour: [5 marks] Here is the CIE chromaticity diagram. Each dot represents a different colour. "C" is white.

a.      [1 mark] Which colours correspond most closely to the R,G,B phosphors?

 

b.     [1 mark] Which colour(s) are complementary?

 

c.     [1 mark] Which colour(s) have the same dominant wavelength?

 

d.     [1 mark] Which colour(s) have no dominant wavelength?

 

e.      [1 mark] Which colour(s) consist of a single wavelength?


2.     Projection: [5 marks] Here is a sketch of the geometry of perspective, showing:

- the line segment PQ with endpoints P(x y z) and Q(a b c),
- the projection P'(x' y' -d) of P, and
- midpoint M of segment PQ.

a.      [1 mark] What are the coordinates (x' y') of the image point P'?

 

 

 

 

b.     [1 mark] What are the coordinates of M', the image of the midpoint M?

 


 

c.     [1 mark] Line segment PQ maps to the image segment P'Q'.
Let R be the midpoint of P'Q'. What are the coordinates of R?

 

 

 

 

 

 

d.     [2 marks] Under what circumstances will R=M'?


3.     Visibility: [5 marks] Consider a set of polygons, represented in 2D cross-section as line segments. Arrows represent front-facing normals.

a.      [3 marks] Draw the BSP tree obtained by inserting the polygons in alphabetical order. Left subtrees correspond to the front side, and right subtrees to the back. If any polygons are split, label the fragments on the diagram and the tree.

 

 

 

 

b.     [2 marks] For the given camera eye point, list polygons in the order they are drawn by the BSP traversal algorithm.


4.     Scan Conversion: [4 marks]

a.      [2 marks] List the pixels produced by scan-converting the line segment from (0,3) to (6,0).

 

 

 

 

 

b.     [2 marks] When we scan-convert polygons, edges often show undesireable stair-step artefacts. What causes them, and how may they be avoided?


5.     Modeling: [5 marks] For this question, use the following openGL-like function calls:

trans(tx,ty)    

scale(sx,sy)    

rotz(ang)

push()

pop()

 

and drawSquare() which draws a square of side length two (below, left):

            

a.      [2 marks] Write a function drawBox(x, y, angle, L, W) (angle in degrees), which draws a rotated rectangle (above, right).

 

 

 

b.     [3 marks] Using drawBox() and the above calls, write code to draw the following branching figure (the 2x8 pieces are tilted 30 degrees).