Skip to main content

CG ECSE-4750 Computer Graphics Final Exam, RPI, Mon 2019-12-16 Solution

Name, RCSID: WRF solutions, frankwr

Rules:

  1. You have 180 minutes.
  2. You may bring in two 2-sided 8.5"x11" papers with notes.
  3. You may not share material with each other during the exam.
  4. No collaboration or communication (except with the staff) is allowed.
  5. There are thirtytwo questions. Check that your copy of this test has all the pages.
  6. Each question is the same weight: five points.

Questions:

  1. Name two major features that were present in the previous major version of OpenGL that were removed from the current version.

    Immediate mode, specific lighting routines, builtin modelview and projection matrices, ...

  2. What is the Mach band effect in the retina?

    Neurons in the retina seem to inhibit their neighbors, effecting a hi-pass filter.

  3. What technical advance enabled frame buffers?

    Big cheap DRAM

  4. Give an application of the vector triple product in computer graphics.

    Volume of a parellelpiped

  5. What is the tristimulus model?

    Most people's eyes have 3 types of color receptors.

  6. In class we said that LCD displays combine pixels that emit three colors: red, green, and blue. However some experimental displays now have four colors; they also have yellow. Why do you think researchers are experimenting with these displays? I said that combining red and green gives yellow, and so having a yellow emitter shouldn't add any new capability?

    They enable more vivid and spectrally pure colors covering a wider gamut. Increase money flowing to the display manufacturers.

  7. What does the javascript function window.alert do?

    Popup a box with a message, which needs to be dismissed by the user.

  8. What is the physical principle underlying LCD?

    1. Fire an energetic electron at a rare earth atom and a photon of light is emitted.
    2. Plowing your family farm as a kid can suggest an way to invent electronic television.
    3. A solution of corkscrew shaped molecules can rotate polarized light.
    4. Putting your finger close to a capacitor can change its capacitance.
    5. If two coils of wire are close, then an alternating current in one can induce a current in the other.
  9. What is different about the wavelength of pure purple compared to pure red, green, or blue?

    Pure purple is not a spectral color and does not have a wavelength. It's a mix of pure red and violet. It has a complementary pure spectral color - green.

  10. Imagine that you're designing the specification of a picking routine. You're thinking about what to return when the user picks a particular pixel on the screen. Why is returning the line of code that colored that pixel insufficient?

    That line of code might be in a routine called several times to draw the same object in different places. Think wheels on a car, or lug nuts on the wheels.

  11. Double buffering solves which problem:

    1. producing stereo images
    2. low memory bandwidth
    3. remote debugging PCs
    4. displaying from a frame buffer while it's being updated
    5. optimizing scheduling two elevators as a group
  12. Homogeneous coords have several advantages compared to cartesian coords. Give three.

    1. Translation is a matrix multiply.
    2. Projection also.
    3. A homogeneous spline can exactly represent a circle.
    4. Points at infinity are representable, so parallel and perspective projections are essentially the same.
    5. You can change control points' weights.
  13. What is one disadvantage of homogeneous coords compared to cartesian? (This takes creative thinking since we didn't mention it in class).

    They take more space. That may require more time.

  14. Generally in engineering, when several solutions to the same problem exist, each is sometimes the best. This question is about 3D rotation. (i) What is particularly good about the vector formula? (ii) What is particularly good about the matrix formula? (iii) What is particularly good about Euler angles?

    1. vector: easily computable from the intuitive axis-angle representation.
    2. matrix: can combine them into one matrix, efficiently executes on current HW.
    3. Euler: matches how mechanical gyroscopes with nested gimbals function.
  15. What type of vertex shader variable has the same value for each vertex?

    1. uniform variable
    2. varying variable
    3. constant variable
    4. variable constant
    5. lighting variable
  16. Does the view normalization transformation preserve straight lines, angles, both, or neither?

    Straight lines but not angles.

  17. Quaternions: simplify (i+j)k.

    = ik+jk = -j + i

  18. What is the purpose of v1 in this line of code?

    var v2 = gl.getAttribLocation( program, "v1" );

    It's the name of an attribute variable in a shader program. (v2 in the javascript program will get its address so thast v1 can be accessed.)

  19. If a 3x3 rotation matrix has eigenvalues \(1, -\frac{\sqrt{3}}{2}+\frac{1}{2}i, -\frac{\sqrt{3}}{2}-\frac{1}{2}i\), then what is the rotation angle (in degrees)?

    \(\cos \theta = -\frac{\sqrt{3}}{2}\) so \(\theta=150\)

    -150 is also acceptable, because you could simultaneously negate the axis and angle.

  20. Give me a matrix M that has this property: for all vectors p, \(Mp = \begin{pmatrix}1 \\ 3 \\ 4\end{pmatrix} \times p\) .

    \(\begin{pmatrix} 0 & -4 & 3\\ 4 & 0 & -1\\-3 & 1 & 0 \end{pmatrix}\)

  21. What is the normalized surface normal to the plane x+2y+3z+4=0?

    \(\frac{(1,2,3)}{\sqrt{14}}\)

  22. What is the difference between Gouraud shading and Phong shading?

    Gouraud computes the shading at each vertex of a face. The shading is bilinearly interpolated at each pixel (fragment) in the face.

    Phong shading computes the normal at each vertex, which is interpolated at each fragment. Then, at each fragment, that interpolated normal is normalized and used to compute the shading at each pixel. This can generate a highlight inside the face, which Gouraud shading cannot. However it is slower.

  23. What is mipmapping? What problem does mipmapping solve?

    A hierarchy of ever coarser (successively averaged) texture maps, with every bigger texels. This lets you pick texels that are close in size to the pixels, even as the face's projected size changes. This improves the image quality.

  24. Beer companies sometimes hand out free cardboard glasses, which have a simple grey filter over one eye. When you watch a commercial with them, you see, sort of, a stereo effect. What property of your vision is this exploiting?

    You see bright objects more quickly. It's as if the retina needs a certain amount of light to see an object. Therefore a dim object will be seen more quickly by the eye w/o the grey filter. If bright and dim objects are moving, this can be exploited to give an illusion of depth.

  25. What does it mean to separate the geometry from the topology?

    geometry: vertex positions. topology: which vertices are at the ends of the edges. Represent the edges by the ids of its vertices, not by the vertices coords. Store them separately. Now, each vertex's coords are stored only once even if the vertex is in several edges. It's easier to move the vertices, and lowers the chance of an inconsistency.

  26. Name the best visibility algorithm when frame buffers are too expensive or too slow.

    Scan line.

  27. What type of hardware was the Bresenham algorithm designed to be efficient on?

    HW with no floating point and slow int mult and division.

  28. Why do you need at least cubic degree for splines, i.e., why is quadratic too low?

    Quadratic can't match curvature at a joint. A quadratic bezier curve lies in a plane, but we want curves that are general in space.

  29. What does local control mean when designing with splines?

    Moving one control point moves only a local region of the spline.

  30. Name one thing that is omitted from WebGL but that is in full OpenGL.

    3D texture maps. compute shaders. NURBS.

  31. When designing a spline curve, how do you deliberately reduce the degree of continuity at a joint?

    Make two or more control point identical.

  32. Why is there now a movement in CAD away from NURBS and back to using just lots of little flat triangles?

    Additive manufacturing (3D printing) doesn't naturally do curves, unlike lathes. NURBS have problems, like non watertight models when the trim lines on two intersecting surfaces are not identical. Triangles are simpler. So, although lots of little triangles isn't perfect, some people like it better.

finished in 30 min