Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CS4102

Computer Graphics

MAY 2021

1. Projections and homogeneous coordinates

(a) What transformations are represented by the following matrices?

 

 

 0(1)   1(0)

T1 =  '(') 0   0 ' 0   0

0(0)     0(m) '

1   m  '

0(1) T2 =  '(') 0 ' 0

0

 1

0

0

n

0

1

0

0(0) '

0  '

 0(1)   1(0) T3 =  '(') 0   0 ' k   k

0

0

1

0

0(0) '

0  '

 

One mark is earned for the correct answer for T1, two for each of T2  and T3 . [5 marks]

(b) Consider the following gure:

 

 

 

Derive the projection matrix that transforms the square ABCD into the A’B’C’D’. [10 marks]

 

[Total marks 15]


 

2. Bzier curves

(a) Consider two cubic Bzier curves, defined by the control points p1, p2, p3, & p4 (the first curve), and p5, p6, p7, & p8 (the second curve). The two curves are to be joined. What minimum conditions have to be satisfied to ensure √0 continuity at the joint where the curves meet?                                                                 [1 mark]

(b) What minimum conditions have to be satisfied to ensure √1  continuity at the joint where the Bzier curves in (a) meet?                                                 [3 marks]

(c) A program is required to draw an arc from (0, 1) to (1, 0) of the circle centred at the origin. One approach would be to draw an approximation in the form of the cubic Bzier curve B(u) defined by the control points (0, 1), (0.5, 1), (1, 0.5) and (1, 0). Calculate the coordinates of B(0.5).                                                [2 marks]

(d) How large is the error in (c)?                                                                      [2 marks]

(e) Leaving the end control points and their tangents in  (c) unchanged,  where should the other two control points be placed so that the error at u  =  0.5 vanishes?                                                                                                     [7 marks]

 

[Total marks 15]

3. Ray tracing

A ray in the direction [1 1 1]T, cast from the origin, is being traced in the context of ray tracing based rendering.

(a) Demonstrate that the ray intersects the triangle defined by vertices  [4 3 5]T, [6 5 5]T, and [4 5 5]T .                                                                                   [6 marks]

(b) If the scene contains two point light sources, at [0 1 0]T and [1 0 0]T, what are the

shadow rays traced at the next level of the recursion?                             [3 marks] (c) What is the reflection ray traced at the next level of the recursion?         [6 marks]

[Total marks 15]


 

4. Marching cubes

(a)  Figure 1 shows a sensing grid used to sense a scalar eld in 2D and the values

of the field at the sensing loci. Sketch the isocontour (analogous to isosurface in 3D) corresponding to the scalar field value of 1.5 which would be obtained by the application of the marching squares (the 2D equivalent of marching cubes). Briefly explain how you arrived at the solution.

 

 

1        1        1        1        1        1


 

 

 

1

 

 

1

 

 

2

 

 

1

 

 

1

 

 

1

 

 

1

 

 

3

 

 

2.5

 

 

2

 

 

1

 

 

1.5

 

 

 

3

 

 

1

 

 

1

 

 

1

 

 

 

2

 

 

1

 

 

1

 

 

1

 

 

 

1

 

 

1

 

 

1

 

 

1

 

 

 

1

 

 

1

 

Figure 1: Sensing grid and the corresponding scalar values at the sensing loci.

[10 marks]

(b) Does the 2D version of the marching cubes algorithm,  that is the so-called marching  squares  algorithm,  exhibit  the  same  ambiguity  problem  that  the original 3D version does?   If your answer is negative, explain why;  if your answer is positive, provide an example.                                                   [5 marks]

 

[Total marks 15]