You are on page 1of 3

Birla Institute of Technology and Science-Pilani, Hyderabad Campus

Second Semester 2011-2012


COMPREHENSIVE EXAMINATION
Course No: CS C471/IS C471 Course Title: Computer Graphics
Type: Closed Time: 3 hrs Total Marks: 120 Wt.age: 40% Date:12/5/12
Total Number of Pages = 3
General Instructions: Exam is closed book. Total time is 3 hrs. Calculator is allowed.
Write to the point answers. Write neatly.

Q1: Can we construct a mesh of a sphere with only quads such that the degree of each
vertex of the mesh is 4? Prove your claim. [10]

Q2: Use the de Casteljau algorithm to design a curve in 2D of degree four that has its
middle control point on the curve for parameter value t = 0.5. Five collinear points are a
solution but you have to present a better example. In your answer provide the coordinates
of the 5 control points and then show that the middle control point lies on the curve. [10]

Q3: Given a triangle mesh, briefly explain the key differences in how triangle normal are
used to evaluate (i) flat shading, (ii) Gouraud shading, and (iii) Phong shading. [10]

Q4: Explain window to viewport mapping. Find the normalization transformation that
maps a window whose lower left corner is at (1,1) and upper right corner is at (3,5) onto a
viewport that is entire normalized device screen. [10]

Q5: Consider the cubic spline segment, P(t) = a t3 + b t2 + c t + d; on the unit interval t ε
[0; 1]. Recall that Hermite splines use P and P’ controls at each end point, i.e., P0 = P(0),
P0’ = P’(0), P1 = P(1), P1’ = P’(1). In this question you will derive a spline which instead
uses the following controls: at t = 0, use position (P0), velocity (P0’) and acceleration
(P0’’); at t = 1, use position (P1).
What is this spline’s 4x4 geometry matrix G such that [10]

 P0 
 P ′
[
P (t ) = t 3 t2 ]
t 1 G 0 
 P0′′
 
 P1 

Q6. Show that affine transformations in 2D preserve parallel lines. [10]

Q7: Calculate a 4x4 matrix that rotates points about the vector A = [1,1,1] by 90 degrees.
Show your work. [10]

PTO Page 1
Q8: Illustrate the steps of Weiler-Atherton polygon clipping algorithm using the below
given figure where C1, C2, C3, and C4 is the clip polygon and S1, S2, S3, S4, S5, S6,
and S7 is the subject polygon to be clipped. [12]

S2
C2 C3

S1
S3 S4

S7 S6

C1 C4

S5

Q9: Suppose we wish to clip a set of lines to a rectangular window with a hole in it:

Call the outer rectangle R with vertices r0, r1, r2, and r3 and call the inner rectangle H
with vertices h0, h1, h2, and h3. You may assume hi as the corner closest to ri. Describe
an algorithm for clipping lines to this object. [8]

Q10: Consider a polygonal mesh in 3D with 10000 triangles. You are given 100 line
segments and you want to detect which all triangles of the mesh are getting intersected by
these line segments. Write an efficient algorithm to obtain the list of triangles intersected
by a line segment. Also provide routine to check whether a line intersects a triangle or
not.
[10]

PTO Page 2
Q11:
(a) Given is a world coordinate system with the origin O=(0,0,0) and a second
coordinate system with the origin P=(px, py, pz) in world coordinates. The basis
vectors u, v and n of the second coordinate system are normalized and orthogonal
to each other. Find the homogenous matrix M which converts the uvn-coordinate
system into the world coordinate system. Write down all components of the
matrix M. [5]

(b) Consider that eye is at (4,4,4), looking at (0,1,0) and the up vector is (0,1,0).
Compute the view matrix created by gluLookAt(). [5]

Q12:
(I) Consider the following terms [10]
(a) Camera space (e) Object space
(b) Image Space (f) Outer space
(c) Inner space (g) Projective space
(d) Normalized View space (h) World space

Graphics pipeline: Select the correct spaces from above and list them in the order that we
expect each vertex to go through in the traditional transformation process:

Fill in the letters : 1._____2._____3._____4._____5.______

(II) Match the descriptions to the appropriate concepts.


(a) A simpler object to make culling tests quicker
(b) Draw or don’t draw triangles based on the order of their vertices
(c) Making things farther away appear smaller
(d) Only draw objects that are in view
(e) Preserve parallel lines

____ Backface culling ____ Orthographic transform


____ Bounding volume ____ Perspective transform
____ Frustum culling

PTO Page 3

You might also like