Docsity

CS3451 Test 2 Practice Problems - Fall 2006, Exams of Computer Graphics

Toggle sidebar
bg1
CS3451 TEST 2 – practice problems
FALL 2006
1. What is the area of the polygon with vertices (in order along the bound-
ary) (0,5), (5,2), (10,1) and (−2,−3)?
2. Let’s say you are given a hexagon in the plane. You draw intervals inside
the hexagon. Together with the edges of the hexagon, the intervals are such
that:
(a) if two intervals share a point, it has to be an endpoint of both
(b) the intervals form a connected graph
(c) every endpoint of an interval is also an endpoint of another interval
(d) the intervals split the hexagon into 5500 regions, 3000 of which are triangles
(have 3 edges), 2000 - quads (4 edges) and 500 are pentagons (have 5
edges).
Calculate:
(1) The number of edges that have been drawn (excluding the hexagon’s edges).
(2) The number of endpoints of the intervals (including the hexagon’s vertices);
if several edges share en endpoint, count it just once
3. Let’s say you are given a function GetColor(x1,y1,x2,y2) that returns
the color incoming from the direction of the ray passing through (x2,y2,0) and
(x1,y1,-1) (in that order). Assume all objects in the scene have positive z-
coordinates. You want to render the scene from viewpoint (vx, vy, vz) and using
screen described as in the first project: lower left corner at (lx, ly, lz), vectors
running along the edges: (hx, hy, hz) and (vx, vy, vz).
(a) When is it possible to draw the scene using only the GetColor function?
Give a precise algebraic criterion (e.g. a few inequalities). Be cautiously
conservative, but not excessively conservative.
(b) What arguments would you use when calling the GetColor function to
obtain the color that needs to be used for pixel at (x, y, z )? Assume the
criterion you gave at (a) is fulfilled and that (x,y , z) is on the screen.
4. Imagine you are standing in the middle of a large cubical room. The
floor of the room is white. The ceiling is black. The wall in front of you is red.
The wall in the back is green. The walls on the left and on the right are blue
and yellow (respectively). There is a small mirror ball hanging from the ceiling,
right above you. Assume that it is so small that it obscures only a part of the
1
pf2

Partial preview of the text

Download CS3451 Test 2 Practice Problems - Fall 2006 and more Exams Computer Graphics in PDF only on Docsity!

CS3451 TEST 2 – practice problems

FALL 2006

  1. What is the area of the polygon with vertices (in order along the bound- ary) (0, 5), (5, 2), (10, 1) and (− 2 , −3)?
  2. Let’s say you are given a hexagon in the plane. You draw intervals inside the hexagon. Together with the edges of the hexagon, the intervals are such that:

(a) if two intervals share a point, it has to be an endpoint of both

(b) the intervals form a connected graph

(c) every endpoint of an interval is also an endpoint of another interval

(d) the intervals split the hexagon into 5500 regions, 3000 of which are triangles (have 3 edges), 2000 - quads (4 edges) and 500 are pentagons (have 5 edges).

Calculate:

(1) The number of edges that have been drawn (excluding the hexagon’s edges).

(2) The number of endpoints of the intervals (including the hexagon’s vertices); if several edges share en endpoint, count it just once

  1. Let’s say you are given a function GetColor(x1,y1,x2,y2) that returns the color incoming from the direction of the ray passing through (x2,y2,0) and (x1,y1,-1) (in that order). Assume all objects in the scene have positive z- coordinates. You want to render the scene from viewpoint (vx, vy , vz ) and using screen described as in the first project: lower left corner at (lx, ly , lz ), vectors running along the edges: (hx, hy , hz ) and (vx, vy , vz ).

(a) When is it possible to draw the scene using only the GetColor function? Give a precise algebraic criterion (e.g. a few inequalities). Be cautiously conservative, but not excessively conservative.

(b) What arguments would you use when calling the GetColor function to obtain the color that needs to be used for pixel at (x, y, z)? Assume the criterion you gave at (a) is fulfilled and that (x, y, z) is on the screen.

  1. Imagine you are standing in the middle of a large cubical room. The floor of the room is white. The ceiling is black. The wall in front of you is red. The wall in the back is green. The walls on the left and on the right are blue and yellow (respectively). There is a small mirror ball hanging from the ceiling, right above you. Assume that it is so small that it obscures only a part of the

ceiling and that you are very small compared to the size of the room (or, even better, invisible). How many and what colors can you see in the ball? Explain why

(a) Can a mesh in which every edge has two incident triangles have 2005 edges? 2006 edges? Explain why.

(b) A manifold mesh of genus 0 has 3000 edges. How many triangles and vertices does it have?

  1. Compute the volume and surface area of the tetrahedron with vertices (0, 0 , 0), (1, 0 , 0), (0, 1 , 0) and (0, 0 , 1).
  2. Using the half-edge notation (f.h=a half edge bounding a face f, h.o, h.n, h.p = opposite, next, previous half-edge for h, h.s = starting vertex of h), write a pseudocode that would list all vertices on the outer loop of a face f (each one just once)
  3. Let’s say that you have the following information about a function f with scalar values defined on the plane: f (0, 0) = 1, f (0, 1) = 2), f (1, 0) = 3, f (1, 1) = 4. Compute the value of f at (0. 5 , 0 .75) using bilinear interpolation.
  4. Using the half-edge notation (v.h for a half-edge out of a vertex v, h.n,h.p, h.o for the next, previous and opposite half-edge for a half-edge h) give a pseu- docode of a procedure that computes the degree of a vertex v in a manifold mesh. Degree of a vertex is defined as the number of its incident edges.
  5. To do spherical environment mapping, we used a photograph of a reflec- tive sphere as the texture. Is it possible to use a photograph of a reflective cube instead? Explain why.
  6. What is the absolute value of

det

1 x y 1 10 10 1 10 11

+det

1 x y 1 10 11 1 11 11

+det

1 x y 1 11 11 1 11 10

+det

1 x y 1 11 10 1 10 10

where x and y are arbitrary numbers?

  1. The Bunny model I gave you as Project 2 input has 69451 triangles. Every edge of the Bunny has either 2 incident triangles or 1 incident triangle. There are 223 edges with 1 incident triangle, and such edges form four closed loops.

1 What is the total number of edges?

2 Compute the number of vertices in the Bunny model using the Euler’s for- mula.