Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Midterm Exam - Introduction to Computer Graphics | CS 5501, Exams of Computer Science

Material Type: Exam; Professor: Brogan; Subject: Computer Science; University: University of Virginia; Term: Fall 2000;

Typology: Exams

Pre 2010

Uploaded on 03/11/2009

koofers-user-ho5
koofers-user-ho5 🇺🇸

10 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 5 5 1 /6 4 5 : In tro d u c tio n to Co m p u te r G ra p h ic s
Mid te r m E x a m in a t io n
O c to b e r 1 9 , 2 0 0 0
N am e:____________________________
H o n o r P le d g e : T h is is a c lo se d -b o o k , c lo s e d -n o te s , in d e p e n d e n t e x a m . P le a se sig n th e
h o n o r p le d g e : O n m y h o n o r a s a s tu d e n t, I h a v e n e ith e r g iv e n n o r
re c e iv e d in fo r m a tio n o n th is e x a m . S ig n e d , _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
D is p la y T e c h n o lo g y
1 ) W h a t is a sc a n lin e ?
2 ) F r a m e b u ff e rs a r e d e s c r ib e d a s h a v in g a c e rta in d e p th . T o w h a t d o e s th e d e p th
re fe r?
3 ) W h a t is s to re d in th e fr am e b u ff e r w h e n a c o lo r m a p lo o k u p ta b le is u s e d ?
4 ) W h a t is a s h a d o w m a sk ?
Ma th e m a ti c a l F o u n d a tio n s
5 ) G iv e n tw o p o in ts , (a , b ) a n d (c , d ), p ro v id e th e fo llo w in g e q u a tio n s o f a lin e :
S lo p e -in te rc e p t:
P a ra m e tr ic :
pf3
pf4
pf5
pf8

Partial preview of the text

Download Midterm Exam - Introduction to Computer Graphics | CS 5501 and more Exams Computer Science in PDF only on Docsity!

CS 5 5 1 /6 4 5 : In tro d u c tio n to Co m p u te r G ra p h ic s Mid te r m E x a m in a tio n O c to b e r 1 9 , 2 0 0 0

N a m e :_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

H o n o r P le d g e : T h is is a c lo s e d -b o o k , c lo s e d -n o te s , in d e p e n d e n t e x a m. P le a s e s ig n th e h o n o r p le d g e : O n m y h o n o r a s a s tu d e n t, I h a v e n e ith e r g iv e n n o r re c e iv e d in fo rm a tio n o n th is e x a m. S ig n e d , _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

D is p la y T e c h n o lo g y

1 ) W h a t is a s c a n lin e?

2 ) F ra m e b u ffe rs a re d e s c rib e d a s h a v in g a c e rta in d e p th. T o w h a t d o e s th e d e p th re fe r?

3 ) W h a t is s to re d in th e fra m e b u ffe r w h e n a c o lo r m a p lo o k u p ta b le is u s e d?

4 ) W h a t is a s h a d o w m a s k?

Ma th e m a tic a l F o u n d a tio n s

5 ) G iv e n tw o p o in ts , (a , b ) a n d (c , d ), p ro v id e th e fo llo w in g e q u a tio n s o f a lin e :

S lo p e -in te rc e p t:

P a ra m e tric :

6 ) P ro v id e a g e o m e tric (u s e a p ic tu re ) a n d a n a lg e b ra ic d e fin itio n o f th e d o t p ro d u c t o f tw o v e c to rs , [u (^) x , u (^) y , u (^) z ] a n d [v (^) x , v (^) y , v (^) z ]

7 ) W h a t is a n o rth o n o rm a l m a trix?

8 ) Co m p u te th e in v e rs e o f th e fo llo w in g o rth o n o rm a l m a trix :

O p e n G L

9 ) U s e g lP u s h M a trix (), g lP o p M a trix (), g lR o ta te f(), g lT ra n s la te f (), a n d g lW ire Cu b e () to d ra w th e h o u r m a rk s o n th e fa c e o f a c lo c k. T h e h o u r m a rk s s h o u ld lo o k b e u n it c u b e s o f s iz e 1 .0 a n d th e ir c e n te rs s h o u ld b e 3 .0 u n its fro m th e c e n te r.

1 0 ) G iv e n a v a ria b le , v : F lo a t v [3 ]; v [0 ] = 1 .0 ; v [1 ] = 0 .0 ; v [2 ] = 0 .0 ;

Co m p le te th e fo llo w in g tw o G L fu n c tio n s th a t w ill u s e v a s a p a ra m e te r:

g lV e c to r3 f(_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ); g lV e c to r3 fv (_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ );

  

1 2 ) O n e tria n g le ra s te riz a tio n te c h n iq u e is c a lle d Ed g e Eq u a tio n s. L is t th re e o p tim iz a tio n s im p le m e n te d in th e fo llo w in g tw o c o d e s e g m e n ts :

findBoundingBox(&xmin, &xmax, &ymin, &ymax); setupEdges (&a0,&b0,&c0,&a1,&b1,&c1,&a2,&b2,&c2);

for (int y = yMin; y <= yMax; y++) { for (int x = xMin; x <= xMax; x++) { float e0 = a0x + b0y + c0; float e1 = a1x + b1y + c1; float e2 = a2x + b2y + c2; if (e0 > 0 && e1 > 0 && e2 > 0) setPixel(x,y); } }**

findBoundingBox(&xmin, &xmax, &ymin, &ymax); setupEdges (&a0,&b0,&c0,&a1,&b1,&c1,&a2,&b2,&c2); float e0 = a0x + b0y + c0; float e1 = a1x + b1y + c1; float e2 = a2x + b2y + c2; int xflag = 0; for (int x = xMin; x <= xMax; x++) { if (e0|e1|e2 > 0) { setPixel(x,y); xflag++; } else if (xflag != 0) break; e0 += a0; e1 += a1; e2 += a2; }**

1 3 ) W h a t is a n A c tiv e Ed g e T a b le , a n d h o w is it u s e d in g e n e ra l p o ly g o n ra s te riz a tio n?

C lip p in g

1 4 ) W h e n u s in g th e Co h e n -S u th e rla n d lin e c lip p in g a lg o rith m , h o w d o w e c h e c k th e o p c o d e s to s e e if a lin e c a n b e triv ia lly a c c e p te d o r re je c te d?

1 5 ) W h e n is it a d v a n ta g e o u s to u s e th e Co h e n -S u th e rla n d lin e c lip p in g a lg o rith m in s te a d o f th e Cy ru s -B e c k c lip p in g a lg o rith m?

G e o m e tr ic T r a n s fo r m a tio n s

1 6 ) W h y d o w e u s e a 4 x 4 h o m o g e n o u s c o o rd in a te tra n s fo rm a tio n m a trix w h e n d e s c rib in g tra n s la tio n s , ro ta tio n s , a n d s c a le s , e tc .?

1 8 ) P ro v id e a 3 x 3 m a trix th a t w ill c o m p u te th e n e w v e rtic e s o f a p la n a r h o u s e c e n te re d a t [1 0 , 5 ] a fte r a ro ta tio n o f 9 0 d e g re e s a b o u t its c e n te r:

2 1 ) Ca lc u la te y ’ in th e fo llo w in g fig u re

2 2 ) T h e 4 x 4 p e rs p e c tiv e p ro je c tio n m a trix , Mp e r , c o n v e rts p o in ts fro m th e c a m e ra c o o rd in a te s y s te m to th e v ie w p la n e c o o rd in a te s y s te m. It p e rfo rm s th e c a lc u la tio n fro m th e p re v io u s q u e s tio n. W h a t is th e 4 x 4 m a trix , Mp e r?

C o lo r a n d L ig h t

2 3 ) W h a t is th e n a m e o f th e re g io n o f th e re tin a w h e re o u r v is io n is th e s h a rp e s t?

2 4 ) W h a t c o lo r a re w e th e le a s t s e n s itiv e to? R e d , G re e n , o r B lu e

2 5 ) W h y d o m o n ito rs n e e d to p e rfo rm g a m m a c o rre c tio n?

d

P ( x , y , z )

y

Z

V ie w

p la n e

y ’ =?

2 6 ) If y o u w e re a n a rtis t, try in g to c a re fu lly c o lo r p o ly g o n s b y h a n d , w h ic h c o lo r s p a c e w o u ld y o u p re fe r to w o rk in , R G B o r H S V? W h y?

2 7 ) G iv e n : a n in c o m in g lig h t in te n s ity , I a s u rfa c e n o rm a l, N a v e c to r fro m th e s u rfa c e to th e lig h t s o u rc e , L a v e c to r fro m th e s u rfa c e to th e v ie w e r’s e y e , V s p e c u la r c o n s ta n t, k (^) s d e fin e th e in te n s ity o f th e lig h t re a c h in g th e v ie w e r a s a re s u lt o f th e s p e c u la r e ffe c ts o f th e P h o n g lig h tin g e q u a tio n. Y o u r d e fin itio n m a y o n ly u s e th e s e v a ria b le s.

2 8 ) B o th G o u ra u d a n d P h o n g S h a d in g in te rp o la te a lo n g p o ly g o n e d g e s to c o m p u te in te n s itie s. B u t th e tw o s h a d in g m o d e ls in te rp o la te d iffe re n t th in g s.

a ) W h a t d o e s G o u ra u d S h a d in g in te rp o la te a lo n g e d g e s?

b ) W h a t d o e s P h o n g S h a d in g in te rp o la te a lo n g e d g e s?

2 9 ) T ru e o r F a ls e? R a y tra c in g p ro d u c e s v ie w e r-in d e p e n d e n t lig h tin g s o lu tio n s.

3 0 ) T ru e o r F a ls e? R a d io s ity p ro d u c e s a c c u ra te s p e c u la r h ig h lig h ts

3 1 ) (E x tra Cre d it) W h o is c re d ite d w ith in v e n tin g T h e R e n d e r in g E q u a tio n?