CG ECSE-4750 Computer Graphics Midterm, RPI, Thurs 2018-10-11
Name, RCSID:
.
.
Rules:
- You have 80 minutes.
- You may bring in one 2-sided 8.5"x11" paper with notes.
- You may not share material with each other during the exam.
- No collaboration or communication (except with the staff) is allowed.
- There are 20 questions. Check that your copy of this test has all seven pages.
- If you need more space, use the back of another page, and write a note in the original space to tell us.
-
(2 pts) Suppose that you want to skew an object by adding each vertex's x-coordinate to the same vertex's y-coordinate. Where is the best place to do it?
. .
-
(2 pts) List the four components of the graphics pipeline in the correct order.
. .
-
(2 pts) What is the best type of variable for the location of a global light source in the vertex shader?
. .
-
(2 pts) If M is a 3D Cartesian rotation matrix, what property must the columns have?
. .
-
(2 pts) Name the 2 types of shaders that every WebGL program must have.
. .
-
(2 pts) What is the purpose of gl-canvas in this line of code:
canvas = document.getElementById( "gl-canvas" );
. .
-
(2 pts) What does this line of code do:
gl.viewport( 0, 0, canvas.width, canvas.height );
. .
-
(2 pts) What is the purpose of vPosition in this line of code?
var vPosition = gl.getAttribLocation( program, "vPosition" );
. .
-
(2 pts) Suppose that your vertex shader computed some property of each vertex and you want the rasterizer to compute a weighted value of that property for each fragment. What type of variable would your vertex shader store that property in?
. .
-
(2 pts) Consider an axis a=(1,0,0) and a point p=(2,4,3). What is the component of p that is perpendicular to a?
. .
-
(2 pts) What Cartesian point corresponds to this 3D homogeneous point: (10, 9, 8, 7)?
. .
-
(2 pts) This question is for 2D geometry. What is the homogeneous matrix for the perspective projection whose center is at Cartesian (0,0) and whose viewplane is x=2?
. .
-
Of the explicit, parametric, and implicit curved surface equation types, which one or more makes it easy to test whether a given point is on the surface?
. .
-
(2 pts) Why does WebGL have the triangle-strip object type, in addition to the triangle type?
. .
-
(2 pts) In the WebGL pipeline, the Primitive Assembler does what?
. .
-
(2 pts) You call gl.BufferSubData to do what?
. .
-
(2 pts) What tool maps spectral colors into a human perceptual coordinate system? Use it to determine what one color a mixture of colors will appear to be. The curve of pure spectral colors was determined experimentally.
. .
-
(2 pts) What is the volume of a parallelepiped that starts at (0,0,0) and whose three edges starting from there are (1,0,0), (1,1,0), and (1,1,1)? It's ok to write the expression; no need to evaluate it.
. .
-
(2 pts) Write the transformation equations to make a rectangle from (0,0) to (2,3) fit into a square that from (0,0) to (1,1). Scale the rectangle uniformly and center it in the square.
. .
-
(2 pts) You see the expression flatten(points) often in Javascript programs. what does flatten do?
. .
End of midterm