Docsity

Computer Graphics Midterm Exam, Fall 2005, Exams of Computer Graphics

Toggle sidebar
bg1
CSE 167: Computer Graphics
Midterm
Fall, 2005
1. A triangle is defined by three points a, b, and c. Write an expression for the vector e
which is in the same plane as the triangle and perpendicular to edge bc, while pointing
towards the inside of the triangle.
e = ( c – a ) × ( b – c ) × ( b – c )
(note: various other combinations work)
2. A 3D line segment from point a to point b intersects a plane described by a unit normal
n and point p, which is an arbitrary point somewhere on the plane. Find the point x where
the line intersects the plane.
da = (a - p) ∙ n
db = (b - p) ∙ n
t = db / (da - db)
x = ta + (1-t)b
3. A vertex has a position p and normal n. Write p and n as 4D homogeneous vectors.
p = [px py pz 1]
n = [nx ny nz 0]
(technically, these should be transposed)
4. An object is placed into the world with matrix W. The camera is placed in the world
with matrix C. Find the position of the camera in object space.
dCWp .
1
(note: C.d is the position of the camera in world space)
5. Define Gouraud shading and Phong shading (one sentence each should be enough)
Gouraud shading computes lighting at the vertices and interpolates the color
across the triangle
Phong shading interpolates the vertex normal across the triangle and computes
shading per pixel
pf3
pf4

Partial preview of the text

Download Computer Graphics Midterm Exam, Fall 2005 and more Exams Computer Graphics in PDF only on Docsity!

CSE 167: Computer Graphics Midterm Fall, 2005

  1. A triangle is defined by three points a , b , and c. Write an expression for the vector e which is in the same plane as the triangle and perpendicular to edge bc , while pointing towards the inside of the triangle. e = ( c – a ) × ( b – c ) × ( b – c ) (note: various other combinations work)
  2. A 3D line segment from point a to point b intersects a plane described by a unit normal n and point p , which is an arbitrary point somewhere on the plane. Find the point x where the line intersects the plane. da = ( a - p ) ∙ n db = ( b - p ) ∙ n t = db / ( da - db ) x = t a + (1- t ) b
  3. A vertex has a position p and normal n. Write p and n as 4D homogeneous vectors. p = [ px py pz 1] n = [ nx ny nz 0] (technically, these should be transposed)
  4. An object is placed into the world with matrix W. The camera is placed in the world with matrix C. Find the position of the camera in object space. pW ^1  C. d (note: C. d is the position of the camera in world space)
  5. Define Gouraud shading and Phong shading (one sentence each should be enough) Gouraud shading computes lighting at the vertices and interpolates the color across the triangle Phong shading interpolates the vertex normal across the triangle and computes shading per pixel
  1. A triangle has points a , b , and c. Write an equation for the area of the triangle. area = 1/2 * | ( b – a ) × ( c – a ) | (note: various other combinations work)
  2. Match the term to the definition: a. Bump mapping b. Texture mapping c. Environment mapping d. Displacement mapping _b__1. Mapping image colors _a__2. Mapping normal perturbations _d__3. Mapping geometric distortion _c__4. Mapping reflection of a virtual sphere
  3. Given matrices 

31 32 33 21 22 23 11 12 13 m m m m m m m m m M (^) and 

31 32 33 21 22 23 11 12 13 n n n n n n n n n N (^) , write the equation for component l 31^ of matrix L , where L^  M^  N. l 31 = m 31 n 31 + m 32 n 21 + m 33 n 31

  1. Matrix S is the world matrix for a character’s shoulder joint. Matrix E is the local matrix for the elbow, which is a child of the shoulder. Matrix W is the local matrix for the wrist, which is a child of the elbow. A vertex v is defined in the local space of the

wrist. Write a single equation that computes v , the world space position of the vertex.

v ’ = S ∙ E ∙ W ∙ v

  1. A simulated airplane has a matrix M. Write an if() statement that checks if the plane is tilted more than 60 degrees from being level (assuming that the y -axis points upwards, and the tilt can be in any direction). NOTE: +1 point bonus for finding the most efficient method! if ( M. b .y < 0.5) {…} or M [1][1] (assuming indexing starts at 0)
  2. A rendered animation is suffering from Moiré patterns. Which of the following techniques will eliminate the problem? a. Increasing z-buffer precision b. Uniform supersampling c. Environment mapping d. Random sampling e. Galerkin-Taylor formulation d. Random sampling
  3. A perfectly diffuse white vertex has position v and normal n. The surface is illuminated by a single point light with position p and color c. What is the color reflected off of the vertex? (assume a physically accurate falloff for the point light intensity)

3 p v n p v c    color  Bonus Question: What does the ‘mip’ in mipmap stand for? Multum in parvo (latin for ‘many in one’)