Institutionen för teknisk databehandling, Bo Nordin (bosse@cb.uu.se, 018-183470), 970114

Tentamen i Datorgrafik MN1/DV1 970117
Examination, Computer Graphics MN1/DV1 970117


Tid och plats: 09.00-14.00, CBA

Inga hjälpmedel förutom papper, penna, suddgummi och ordböcker tillåtna. Skriv namn på alla papper du lämnar in. Använd ej rödpenna. Skriv endast på ena sidan av varje papper.

För godkänt krävs 18 p, för väl godkänt 28 poäng (av totalt 40). Resultat meddelas via e-post och anslås på TDB senast 970120.

Time and Place: 09.00-14.00, CBA

Only paper, pen(cil), erasers, and dictionaries allowed. Enter your name on all papers you hand in. Do not use red ink. Write on only one side of each paper.

18 points are required to pass the exam, 28 points are required to pass with distinction ("väl godkänt"). The total number of points is 40. The result will be sent by e-mail and posted at TDB no later than 970120.


1. Grafiska paket / Graphics Packages (1 + 1 = 2p)

a) Vad är skillnaden mellan immediate mode och retained mode?

b) I vilken mod sker interaktionen i i stort sett alla grafiska användargränssnitt i dag?

a) What is the difference between immediate mode and retained mode?

b) Which mode is used for the interaction in today's graphics user interfaces?

2. Linjerastering / Scan Conversion of Lines (1 + 2 = 3p)

Vid visning av primitiver på enheter för rastergrafik görs en rastrering (scan conversion).

a) Vad innebär detta och varför behövs den?

b) Beskriv kortfattat midpoint line-algoritmen för rastrering av räta linjer. Använd en figur.

In order to be able to display primitives on raster graphics workstations, a scan conversion must be done.

c) What does scan conversion mean and why is it necessary?

b) Briefly describe the Midpoint Line algorithm for scan conversion of straight lines. Use a figure.

3. Grundläggande interaktionshantering / Basic Interaction Handling (2p)

Antag att du skall skriva ett program för redigering av kurvor uppbyggda av splines. I specifikationen ingår att endast en musknapp får användas samt att knappar (på skärmen) skall användas för att väja mod: lägga till och ta bort kontrollpunkter, etc. Hur skulle du utforma det grafiska användargränssnittet för att göra programmet så lättanvänt som möjligt? Tänk på hur programmet ser ut för användaren.

Assume you have been asked to write a program for editing spline curves. The specification states that only one mouse button can be used and that buttons (on the screen) are to be used for mode selection: addition and removal of control points, etc. How would you design the graphical user interface in order to make the program easy to use? Think about the program from the user's point of view.

4. Hårdvara / Hardware (0.5 + 0.5 + 0.5 + 0.5 = 2p)

Förklara följande hårdvarubegrepp:

a) uppdateringshastighet

b) efterlysningstid

c) skuggmask

d) skillnaden i positionsbestämning mellan en mus och en digitizer (data tablet).

Explain the following hardware concepts:

a) refresh rate

b) persistence

c) shadow mask

d) the difference in positioning between a mouse and a digitizer (data tablet)

5. Transformationer i 2D och 3D / 2D/3D Transformations (1 + 2 + 1 = 4p)

a) Vad menas med homogena koordinater och varför används sådana?

b) Beskriv kortfattat (gärna med formel) fönster-till-"tittglugg"- transformationen i 2D.

c) En generell transformation (bestående av skalningar, rotationer och translationer) i 2D innebär en del multiplikationer och additioner. Hur många behövs om man tar hänsyn till matrisens struktur efter konkatenering?

a) What are homogeneous coordinates and why are they used?

b) Briefly describe (preferably using formulae) the window-to-viewport transformation in 2D.

c) A general transformation (with scalings, rotations, and translations) in 3D involves a number of multiplications and additions. How many are required if the structure of the concatenated matrix is taken into account?

6. CIE-diagrammet / The CIE Chromaticity Diagram (1 + 1 + 1 + 1 = 4p )

a) Varför är CIEs primärfärger (X, Y och Z) bättre lämpade än röd, grön och blå för att matcha alla möjliga färger?

b) Vad motsvarar Y i CIE-modellen i verkligheten?

c) Hur används färgmatchningskurvorna för att specificera en färg.

d) Rita färgmatchningsfunktionerna för CIE's primärfärger.

a) Why are the CIE primaries (X, Y, and Z) better suited than red, green, and blue to match all possible colours?

b) What does Y in the CIE model correspond to?

c) How are the colour matching functions used to specify a colour?

d) Draw colour matching functions for the CIE primaries.

7. Motif (2p)

Ur applikationsprogrammerarens synpunkt, hur förenklar Motif hanterandet av händelser jämfört med att skriva i X utan användande av något toolkit?

From the application programmer's point of view, how does Motif simplify event handling compared to writing in X without using a toolkit?

8. Borttagning av skymda ytor / Visible Surface Determination (1 + 3 = 4p)

a) Att kunna avgöra vilka linjer och ytor som syns från betraktaren är viktigt för att åstadkomma realistiska bilder. Det finns två fundamentalt olika sätt att göra detta. Målaralgoritmen (Painter's algorithm) och z-buffer-algoritmen är exempel på algoritmer från vardera typerna. Vilka typer av algoritmer avses? Klassificera målaralgoritmen och z-buffer-algoritmen.

b)Beskriv kortfattat de båda algoritmerna i a).

a)Visible surface determination (VSD) is an important step in the generation of realistic images. There are two fundamentally different ways of accomplishing VSD. Painter's algorithm and the z-buffer algorithm are examples from each type of algorithm. What are the two types of algorithms? Classify Painter's algorithm and the z-buffer-algorithm into the correct type.

b) Briefly describe the two algorithms in a).

9. Klippning av polygoner / Polygon Clipping (4p)

Beskriv Sutherland och Hodgmans algoritm för klippning av polygoner. Visa utseendet av polygonen nedan efter varje steg om den klipps mot den visade klipprektangeln.

Describe the Sutherland-Hodgman Polygon-Clipping Algorithm. Show the appearance of the polygon below after each step if it clipped against the clip rectangle shown.

10. 3D-grafik / 3D viewing (1 + 3 + 1 = 5p)

a) Vad beskriver nedanstående modell?

b) Förklara de ingående termerna.

c) I PHIGS används begreppen view orientation matric och view mapping matrix. Hur relateras dessa till modellen?

a) What does the model below describe?

b) Explain the terms in the model.

c) PHIGS uses a view orientation matrix and a view mapping matrix. How are these matrices related to the model?

Nper = MVV3DV M Sper SHpar T(-PRP) R T(-VRP)

11. Om fraktaler / About Fractals (1 + 1 + 1 = 3p)

Inom fraktal-geometrin används begreppet fraktal dimension. Ge ett uttryck för den fraktala dimensionen för de tre exemplen nedan.

The fractal dimension is an important concept in fractal geometry. Give an expression for the fractal dimension of the three examples below.

12. Belysning / Illumination (3p)

Beskriv termerna i belysningsmodellen nedan.

Describe the terms in the illumination model below.

I = Iaka + fattIp(kd(NL) + ks(RV)n)

13. Rymduppdelningstekniker / Spatial-Partitioning Techniques (1 + 1 = 2p)

Ett sätt att representera solida kroppar (solids) är rymduppdelning (spatial partitioning).

a) Vilken är skillnaden mellan voxel och cuberille?

b) Diskutera nackdelar med att använda voxelrepresentation jämfört med att representera objekt med polygoner.

One way of representing solids is spatial partitioning.

a) What is the difference between a voxel and a cuberille?

b) Discuss drawbacks of voxel representations compared with polygon representations.