DOC

# UNIVERSITY OF MAURITIUS

By Adam Martin,2014-07-09 03:52
10 views 0
UNIVERSITY OF MAURITIUS

UNIVERSITY OF MAURITIUS

FACULTY OF ENGINEERING

PAPER NO EXAMINATION DATE

First Semester

BECSE/01F/9 BEng (Hons) Computer Thursday

Science & Engineering 29 November 2001

Level 3

SERIES PAPER TIME

Nov/Dec 2001 Computer Graphics 13.30 15.30

(CSE 3102)

EXAMINERS:

MR R RAMDHANY

MR A RAMLOWAT

This paper contains SIX (6) Questions. Students are requested to

answer ANY TWO (2) Questions from Section A and ANY TWO (2) Questions from Section B.

Each Question is worth 25 marks.

SECTION A

Answer ANY TWO (2) Questions from this Section

Question 1

(a) The following diagram shows the organization of a raster system:

Display-Frame Video Processor Controller Monitor Buffer Memory

CPU System Display Memory Processor

System Bus

I/O Devices Explain briefly the function of the following components in the raster

system organization:

Frame Buffer

Display Processor

Display Processor Memory

Video Controller. [4 marks]

(b) How do raster-scan systems and random-scan systems differ? Which

one is more commonly used and why? [4 marks]

(c) The goal of any line algorithm is to construct the best approximation of

an ideal line given the inherent limitations of a raster display.

(i) What are the line qualities that are considered when evaluating

a line-drawing algorithm? [4 marks]

(ii) What technique(s) could be used to optimise the performance of

a line-drawing algorithm? [4 marks]

(d) Explain how the DDA-line drawing algorithm works.

Illustrate your answer by calculating using DDA, the intermediate

points of a line with end points (20, 10) and (25, 20). [7 marks]

What are the drawbacks of this algorithm? [2 marks]

Page 1 of 8

Question 2

(a) When line segments are scan-converted for display, frame buffer

positions must be calculated.

ymaxscreen

(x,y) scan-lines

3

2

1

x 0 max

pixels

,y) (xmaxmax(0,0) (1,0) (2,0) (x,y) (0,1) (1,1) (2,1) (x,0) (x,1) max(0,2) max

Assuming the frame buffer address for the pixel at (0,0) is given by

Addr(0,0), derive expressions for the frame-buffer bit address for pixel

positions,

(i) (x,y)

(ii) (x+1, y)

(iii) (x+1, y+1).

[6 marks]

(b) What do you understand by the following terms: (i) Run-Length Encoding

(ii) Cell Encoding?

[4 marks]

(Continued on next page)

Page 2 of 8

Question 2 (Continued)

(c) The bresenham midpoint circle algorithm uses a decision parameter p

to determine the pixel position closest to the circumference of the circle.

A rough pseudo-code of the midpoint circle algorithm is given below:

{

x=0

plot_points(xcentre,ycentre,x,y) ;

initialize p ;

while (x<y) {

if ( p > 0 ) ++x;

else{

++x;

y ; --

}

if (p<0) p += E;

else p += NE;

plot_points(xcentre,ycentre,x,y);

}

}

(i) Derive expressions for the following:

a. P [3 marks]

b. E [4 marks]

c. NE [4 marks]

(ii) What properties of circles could you use to reduce the computation of

points on the circular path? Illustrate your answer by writing the

implementation of the function plotpoints().

[4 marks]

Page 3 of 8

Question 3

(a) The Ellipse Midpoint algorithm uses the ellipse function, f(x,y) as a

decision parameter to determine which pixel to choose for points on

the elliptical path.

222222f(x,y) = r + r y rr xyxxy

y Region1 Q

r yRegion2

rxx

; We start at (0,r) taking unit steps along the x-axis and compute the y

decision parameter for Region1 each time.

; We switch to unit steps in the y-direction when the slope on the

elliptical curve is less than 1 (at point Q). The decision parameter for

Region2 is now used to determine the pixel position.

(i) Calculating the slope of the ellipse at each unit x-interval is time

consuming. How can you improve this decision of where exactly to

change the sampling direction? Show your calculation.

[4 marks]

(ii) Derive the decision parameter for Region1.

[8 marks]

(b) In scan-line filling, points of intersection of each scan-line with the

polygon edges are determined and the pixels in between, filled with

the specified fill color.

(i) Show how you can use incremental calculation to compute the

points of intersection of scan-lines along a polygon edge. Derive

any equations involved.

[4 marks]

(Continued on next page)

Page 4 of 8

Question 3 (Continued)

B yb

C

y c

E yE

yDD y AA

(ii) Sketch the sorted-edge table for the polygon shown above, filled

using the scan-line filling algorithm. Explain how this

information is used to scan-convert a polygon.

[6 marks]

(iii) Use the Non-Zero Winding Number Rule to identify the interior

regions of the polygon shown below.

A D

C G

E

F

B

[3 marks]

Page 5 of 8

SECTION B

Answer ANY TWO (2) Questions from this Section

Question 4

(a) Transformation matrices are expressed in homogeneous coordinates.

(i) Explain the advantages of using homogeneous coordinates.

[3 marks]

(ii) Illustrate your answer by obtaining the transformation matrix for

the following series of two-dimensional transformations:

; a translation by [10,20] followed by,

; a rotation about the origin given by the non-unit upwards

orientation vector [4,5], followed by

[4,5]

; a scaling transformation about the origin by scale factor=2 along

both axes. [7 marks]

(b) How does the Cohen-Sutherland line clipping algorithm use region

codes to clip lines against the viewport? Explain all the steps involved

and illustrate your answer by considering the lines in the figure below:

P3

P6

P5 P 1

Clipping P 2 window

P 4[6 marks]

(c) (i) What is the Nyquist Frequency? [2 marks]

(ii) What is pixel phasing? What graphics problem does it address?

[3 marks]

(iii) Describe briefly two other methods which can be used to

address the same problem. [4 marks]

Page 6 of 8

null

Question 6

(a) What are the two basic characteristics of fractals? [4 marks]

(b) Calculate the Fractal dimension D for the following fractal:

?

?

?

[4 marks]

(c) To investigate the effect of hotel construction sites on underwater

marine life, you have been requested by the Ministry of Fisheries to

build a three-dimensional model of a lagoon. The three-dimensional

scene should be as realistic as possible and will be used for simulation

purposes. A simplified 3D model of a lagoon is shown below:

Sea

surface

Fern-corals

Discuss how you would produce realistic displays of the following:

(Specify which modeling structure you would use in each case and

describe methods you would use to generate that structure)

(i) Sea surface,

(ii) Fern-corals,

(iii) Water spray.

[12 marks]

(d) Explain the depth buffer algorithm for removing surfaces hidden by

other opaque surfaces. [5 marks]

END OF QUESTION PAPER

Page 8 of 8

Report this document

For any questions or suggestions please email
cust-service@docsford.com