Cosc 371
Cosc 371
Cosc 371
CHUKA UNIVERSITY
UNIVERSITY EXAMINATIONS
THIRD YEAR SEMESTER TWO EXAMINATION FOR THE AWARD OF
DEGREE OF BACHELOR OF COMPUTER SCIENCE AND BACHELOR OF APPLIED
COMPUTER SCIENCE
COSC 371 AND ACSC 374: COMPUTER GRAPHICS
TIME: 2 HOURS
a) Explain the need for understanding the human visual system when studying computer
graphics. (3 marks)
b) Describe the principles of operation of each of the following line drawing algorithms
stating the merits and demerits of each:
i) The simple DDA
ii) Brenham’s
(6 marks)
iii) Explain the importance of shadows in graphics rendering systems (2 marks)
c) Explain each of the following with respect to graphics and explain their importance:
i) Clipping.
ii) Shading.
iii) Morphing.
(6 marks)
d) Describe the transform needed to transform the triangle from B to A in Figure 1,
(4 marks)
Page 1 of 3
COSC 371
e) A raster graphics system has a resolution of 1024X512. Determine the size of the frame buffer
(in Megabytes) to store an image if each pixel takes 16-bits of memory. (3marks)
f) State three coordinate systems that you may encounter in a rendering pipeline. (3 marks)
g) State Three merits of using OpenGL in graphics rendering. (3 marks)
a) A Rectangle is defined in two dimensions by its vertices (2,4), (5,4), (5,6) and (2,6). Derive
the matrices to perform each of the following transformation, and evaluate the coordinates of
the resulting vertices.
i) Translate the rectangle in space by 5 units in the x-direction and 3-units in the y-
direction. (4 marks)
ii) Scale the original triangle by a factor of 7.5; (4 marks)
iii) Rotate the original triangle by 350 anticlockwise about the origin. (4 marks)
Page 2 of 3
COSC 371
a) i) With the aid of a pseudo code, explain the simple Digital Differential Analyzer
(DDA) algorithm for generating a line whose end points are (x0, y0) and (x1, y1).
(6 marks)
ii) A line has two end points (x0, y0) = (2,6) and (x1, y1) = (12,12). Execute the
simple DDA algorithm manually and show the pixels generated. (4 marks).
iii) Calculate the length of the line in a(ii). (2 marks)
b) i) Outline the procedure of ray-tracing method of rendering of scenes in computer
graphics. (4 marks)
ii) Make a comparative analysis of the wire frame and solid modeling.
(4 marks)
QUESTION FOUR (20 MARKS)
a) Explain three application areas of computer graphics (3 marks)
b) List four graphics input devices (2 marks)
c) With the aid of a diagram, explain how the Cathode Ray Tube works (5 marks)
d) i) Explain why curves and surfaces are normally represented in parametric form.
(2 marks)
ii) State three properties of Bezier curves. (3 marks)
iii) A Bezier curve has the following control points: (2,0), (4,3), (5,2), (4, -2), (5, -3) and
(6, -2). Derive the parametric equation of the curve, in the form: x= f1(t), y= f2(t).
(5 marks)
QUESTION FIVE (20 MARKS)
a) Describe each of the following shading algorithms
i) Phong (2 marks)
ii) Gouraud (2 marks)
b) Write a program using OpenGL (or any other graphics Engine) to perform the
following: Draw a house consisting of two figures; a square and a triangle. The square is
defined by points (-0.4, 0.4), (-0.4, -0.4), (0.4, -0.4), (0.4, 0.4) and is BLUE in colour and
the triangle is defined by (0.0, 0.9), (-0.4,0.4), (0.4, 0.4) and is yellow in colour.
(7 marks)
c) Explain the basic principles of creating computer animation. (6 marks)
d) Explain hidden line removal with respect to visual realism. (3 marks)
……………………………………………………………………………………………………………………………………………….
Page 3 of 3