ECSE-4750 Computer Graphics, Rensselaer Polytechnic Institute, Final Exam B, 12 Dec 2013
NAME: _______________________________________________EMAIL:__________________________ RIN:_________________________________
TOTAL: ___________/160
- There are 40 questions. Answer them all. However, you may write free as the correct answer to any two questions.
- Each question is worth 4 points.
- There are 11 pages.
- This exam is closed book; you may have two 2-sided letter-size note sheets. You may not use computers or communication devices, or share material with other students.
- ________ Does projection preserve angles? Justify your answer.
- ________ When using 2D homogeneous coordinates, at what point do the lines x+y+w=0 and x+2y+3w=0 intersect?
- ________ Consider the triangle with Cartesian vertices (0,0,0),
(1,0,0),(0,1,1). What is the normal to its surface? Your answer must be normalized.
- ________ Here is a 2D homogeneous transformation matrix. Prove that it
is, or is not, a rotation. If it is, then what is the angle of rotation?
{$ \begin{pmatrix} 0 & -4 & 0 \\ 4 & 0 & 0 \\ 0 & 0 & 4 \end{pmatrix} $}
- ________ Assume that one rotation is expressed as the quaternion j and that a 2nd rotation is the quaternion k. What is the quaternion for those two rotations in order combined?
- ________ What is its axis and angle?
- ________ Suppose that you want to move a robot arm along a path that is a
spline curve. What is wrong with using a piecewise quadratic spline?
Saying, "the curve looks bad", is not informative enough.
Consider these 4 types of lighting:- user-specified color at each vertex. y / n, y / n
- user-specified ambient lights with ambient material colors. y / n, y / n
- user-specified diffuse lights with diffuse material colors. y / n, y / n
- user-specified specular lights with specular material colors. y / n, y / n
- ______ For each of those say whether the color changes when only the light
moves, by circling y or n in the first y / n group above.
- ______ For each of those say whether the color changes when only the camera
moves, by marking the 2nd y / n group.
Look at this shader program:uniform vec3 lightPos[3]; varying vec3 N, L[3]; void main(void) { // vertex MVP transform gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; vec4 V = gl_ModelViewMatrix * gl_Vertex; // eye-space normal N = gl_NormalMatrix * gl_Normal; // Light vectors for (int i = 0; i < 3; i++) L[i] = lightPos[i] - V.xyz; // Copy the primary color gl_FrontColor = gl_Color; }
- ________ Is this a vertex shader or a fragment shader?
- ________ Where does the variable gl_Vertex get its value?
- ________ Where does the variable lightPos get its value?
- ________ Who uses the value of variable N after this shader finishes?
- _______ In a shader, what does this code do:
v.yxzw = v.xyzw
?
- ______ Imagine a 2-D quadratric Cartesian Bezier curve with control points
P0(0,0), P1(1,0), P2(0,1). What are the points on the curve with t=0,
t=1/2, t=1?
- ______ Imagine a 2-D quadratric Cartesian Bezier curve with control points
P0(0,0), P1(1,0), P2(0,1). Imagine that you are joining a 2nd Bezier
curve to the end of this one, so that there is C1 continuity at the
joint. What are the 1st and 2nd control points of this new curve?
- ______ How many degrees of freedom would a 3D cubic homogeneous Bezier
patch have?
- ______ Give 3 reasons why we usually use a sequence of low-degree curves instead
of one high degree curve.
- ______ Give 1 reason why we use parametric curves instead of explicit curves.
- ______ What does the word Rational in NURBS mean?
- ______ An evaluator is often used to generate vertex positions. Name 3 other
things an evaluator might generate.
- ______ A material's color is represented by 10 numbers. Name them.
- ______ What coordinate system do you define a trim line in?
- ______ The Bresenham line algorithm was devised to operate efficiently with (or
without) what property of hardware?
- ______ What might clipping do to the number of vertices?
- The number of vertices might stay the same or reduce but not grow.
- The number of vertices might stay the same or grow but not reduce.
- The number of vertices might stay the same or grow or reduce.
- The number of vertices must stay the same.
- The number of vertices might stay the same or reduce but not grow.
- ______ What is a texture sampler, and how is it more powerful than an array?
- ______ If you want to create a highlight in the middle of a triangle, can you do that by computing the color at each vertex and interpolating (rastering) the color across the triangle? Justify your answer.
- ______ What happened to immediate mode in the current OpenGL? Why?
- ______ What does Primitive Assembly mean?
- ______ What does this do: glBindBuffer(GL_ARRAY_BUFFER, buffer[VERTICES]);
- ______ glWhat does this do: BufferData(GL_ARRAY_BUFFER, sizeof(vertices) + sizeof(colors), NULL, GL_STATIC_DRAW);
- ______ What does this do: glLinkProgram(programId);
- ______ What does this do: glEnableClientState(GL_VERTEX_ARRAY);
- ______ What does this do: glColorPointer(3, GL_FLOAT, 0, colors);
- ______ What does this do: glMatrixMode(GL_MODELVIEW);
- ______ What does this do: glClearColor(1.0, 1.0, 1.0, 0.0);
- ______ What does this do: glDrawElements(GL_TRIANGLE_STRIP, 10, GL_UNSIGNED_INT, stripIndices);
- ______ What does this do: programId = glCreateProgram();
- ______ Why is it inefficient to do computations in the display routine that
could be done at initialization time.
- ______ What does this do:
<body onload="webGLStart(); resizeCanvas(600); flipAnim()">
END