Computer Graphics Fall 2010 group home

Printer friendlier format of this page

## ECSE-4750 Computer Graphics, Rensselaer Polytechnic Institute, Final Exam, Fall 2010, 15 Dec 2010 6:30 - 9:30pm, DCC330

NAME: ____ Solution

Subtotal of questions 1-10:_______, q 11-25:______, q 26-36:______, TOTAL: ______

Answer every question.There are 7 pages with 36 questions. Each
question is worth 1 point.

This exam is open book: you may use calculators and any
paper books and notes that you brought with you. You may not
use computers or communication devices, or share material
with other students.

⇒You may write *FREE* as the correct answer to any five questions.⇐

- ____ Consider a 3D triangle with vertices (0,0,0), (10,0,10), (0,10,0). What is the z value of the point in the triangle with x=3, y=1? The triangle's equation is z=x, so the answer is z=3.
- ____ The following can not possibly be a 3D Cartesian rotation matrix because the 2nd column's length is not one: {$ \begin{pmatrix} 1&1&0\\0&1&0\\0&-1&1\end{pmatrix} $} Justify, i.e., explain the reason for, this rule. The 2nd column is what the rotation does to (0,1,0). Since rotations don't change lengths, the length of the 2nd column, considered as a vector must be 1.
- ____ If
*a=(7,9,6)*then write {$(a\times p)\, a$} as a matrix M, depending only on {$a$}, times {$p$}. {$ \begin{pmatrix} 0&-6&9\\6&0&-7\\-9&7&0\end{pmatrix} $} - ____ What is the 4x4 homogeneous matrix for
- a 3D rotation by 45 degrees about the Y axis,
- followed by this translation:
*x'=x, y'=y+1, z'=z-2*.

- ______ Can the volume of a small cube change when its vertices are rotated? (yes or no). No. Rotations don't change lengths and so don't change volumes.
- ______ Give the quaternion for a 360 degree rotation about the axis (.6,0,.8). Either q=1 or q=-1. They both have the same effect when you apply {$ p'=qpq^* $}. You would get q=1 by noticing that 360 degrees means the identity, or get q=-1 by applying the formula for computing q from the axis and angle.
- _____ What is one problem with interpolating a spline through the control points instead of approximating a spline near the points? The curve will have to swing wide outside the control polygon.
- _____ Does projection preserve straight lines? Justify your answer. Yes, look at it this way. If you're projecting a (straight) line L from some center of projection (COP) onto a projection plane, then the COP and L define a plane. That plane intersects the projection plane in a straight line. That line is the projection of L.
- _____ Does projection preserve angles? No. For example, a circle might project to an ellipse.
- ______ What advantage do cubic splines have over quadratic splines? You can match the radius of curvature of the two segments at a joint. This makes the joint more invisible, which is desirable.
- ____ Name the effect which accentuates the visibility of the common edge between two adjacent bands of slightly different brightness. Mach band.
- ____ High spatial frequencies can be bad. Name the technique used to remove them. anti-aliasing.
- ____ Which shader is executed first in the graphics pipeline:
*vertex*or*fragment*? vertex. - ____ One way to shade a polygon with many edges is:
- split it into triangles, then
- shade the triangles.

- ____ In the graphics pipeline, when a triangle is processed, the (x,y,z) coordinates of the vertices are interpolated across the whole triangle to give the coordinates of each fragment. Name two other things that may commonly be specified at the vertices and then interpolated across the triangle to give a value for each fragment. texture coordinates, normals, colors.
- ____ Compare Gouraud and Phong shading: Which one is more realistic, especially for highly curved surfaces? Phong.
- ____ Why? Because only it can generate a highlight in the middle of a polygon.
- ____ Where in the graphics pipeline does texture mapping take place? Fragment shader.
- ______ Are vertices assembled into objects in the vertex shader, in the fragment shader, or somewhere else? Rasterizer.
- ______ Is fog generated the vertex shader, in the fragment shader, or somewhere else? fragment shader.
- ______ Clouds and crowds are examples of what type of system? particle systems.
- ______ A major rendering technique was invented by thinking how sunlight shines through a window and bounces around to illuminate the walls, ceiling, and floor of a room. Name that technique. Radiosity; see the book page 324. Also, Wikipedia says, "Radiosity methods were first developed in about 1950 in the engineering field of heat transfer. They were later refined specifically for application to the problem of rendering computer graphics in 1984 by researchers at Cornell University". Ray tracing is wrong since it runs a line of sight from the viewer and renders only specular objects well, not things like walls, ceilings and floors.
- ______ Since clipping to a clip region that is a cube is so easy, graphics systems tranform any scene with its clip window to make the clip window a cube. Name this transformation technique. view normalization.
- ____ Sometimes it's useful to imagine a bounding box around a face. Sometimes two faces' bounding boxes might overlap. IOW (in other words), the two faces overlap in X, overlap in Y, and also overlap in Z. This case causes problems for one common method of determining which face is in from of the other when rendering. Please tell me the name of this method. painters algorithm.
- _____ Draw an example where clipping a triangle causes it to have more vertices. Figure shows a triangle with one vertex outside and two vertices inside the clip window. It gets clipped to a quadrilateral.
- _____ Suppose that you have 12 triangles that can be arranged into a triangle strip. How many vertices would you have to specify to OpenGL if you use the fact that they can be arranged into a triangle strip. 3 vertices for the 1st triangle plus 1 vertex for each other triangle gives 14 vertices.
- ____ Name the OpenGL technique that takes a texture map and creates a hierarchy of coarser and coarser versions of it. Mipmapping.
- ____ What problem of pixels and texels does that solve? Their being different sizes. That always happens with perspective projections since the projected texel's size will depend on how far away it is.
- ____ Following the principle that
*less is more*, the OpenGL designers decided not to include some functionality that a program that processes images would probably need. Name it. File I/O. - ____ When compositing several images, the limited precision of the color (frame) buffers may hurt the image quality. Therefore, OpenGL also has another buffer to composit into. Name it. Accumulation buffer.
- _____ How do you specify a color to be 20% transparent? That would be 80% opaque, so set A=0.8, e.g. (.3,.3,.3,.8).
- ______ Is the following code a vertex shader or a fragment shader? void main(void) { gl_FragColor = gl_FrontColor; } Fragment shader.
- ______ Do you set a texture coordinate thus glTexCoord2f(s0, t0); before or after the vertex it applies to? Before.
- ______ What is swizzling? In GLSL, working with any subset of the elements of a vector, in any order, in 1 cycle. E.g., v.xyz = v.xyz / v.w
- _____Can the standard OpenGL pipeline easily handle light scattering from object to object? Why (not)? No since it processes objects independently of each other.
- _____ Why would you want to write code to write an image in the PPM format (instead of writing code to write it in, say, JPEG)? The PPM file format is very simple, so it's easy to write code to write it.

*END*