ECSE-4750 Computer Graphics, Rensselaer Polytechnic Institute, Final Exam, 13 Dec 2012


NAME: _______________________________________________EMAIL:__________________________ RIN:_________________________________

Subtotal of questions 1-5:____________/40, 6-15:________/40, 16-22:________/40, TOTAL: ___________/120

  • There are 30 questions. There are 7 pages. Each question is worth 4 points.
  • You may mark FREE as the (correct) answer to any two questions.
  • 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.


  1. ________ Consider a cubic 3D Bezier curve with Cartesian control points P0(0,0,0), P1(8,8,8), P2(8,8,8), P3(0,0,0). Compute the point P for t=.5.

    For the next 3 questions, use 2D homogeneous coordinates:
  2. ________ What is the equation of the line through the points (0,0,3) and (1,0,1). Write your answer in the form ax+by+cw=0, giving numbers for a,b,c. Reduce a,b,c so that they have no common factors.

  3. ________ What is the equation of the line through the points (0,1,1) and (2,2,2)?

  4. ________ What is the point where those 2 lines intersect?

  5. ________ Consider the triangle with Cartesian vertices (0,0,0), (1,0,0),(0,1,0). What is the normal to its surface? Your answer must be normalized.

  6. ________ 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?
    {$ \left[ \begin{array}{ccc} 0 & -3 & 0 \\ 3 & 0 & 0 \\ 0 & 0 & 3 \end{array} \right] $}

  7. ________ What is the quaternion for a 180 degree rotation about the X axis?

  8. ________ What is the quaternion for a 180 degree rotation about the Y axis?

  9. ________ What is the quaternion for the first rotation about followed by the second?

  10. ________ What is its axis and angle?

  11. ________ 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? The curve looks bad is not acceptable here.

  12. _______ Write the equations for the following projection: The camera is at (0,0,0). The projection plane is x+y+z=3. Use cartesian coordinates.

  13. ________ Write the homogeneous 4x4 matrix for the above transformation.

  14. ________ When texture mapping for a scene with a perspective projection, it is usually not possible to create a single texture map whose texels will be the same size as pixels for all objects in the scene. Why?

  15. ________ Suppose that you are writing a flight simulator, where we are looking at the scene from outside the airplane. One obvious technique is to render the background before rendering the airplane. Name this technique.

  16. _______ Name the rendering technique where diffuse light bounces from object to object.

  17. _______ Name the type of mapping that can have a shiny doorknob reflect its surroundings.

  18. _______ Name the type of mapping that combines a diffuse object color with a light texture.

  19. ________ With view normalization,
    1. Do distances change? y/n
    2. Do angles change? y/n
    3. Do straight lines stay straight? y/n
    4. Do parallel lines stay parallel? y/n
  20. _______ It can happen that two objects appear to be the same color under incandescent light but differently colored under fluorescent light.
    1. What are these color pairs called?

    2. How can this happen?

  21. _______ Place these 3 steps in order from earliest to latest.
    • fragment processing
    • rasterizing
    • vertex processing

  22. ________ 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
    1. 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.
    2. 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] -;
        // Copy the primary color
        gl_FrontColor = gl_Color;
  23. ________ Is this a vertex shader or a fragment shader?

  24. ________ Where does the variable gl_Vertex get its value?

  25. ________ Where does the variable lightPos get its value?

  26. ________ Who uses the value of variable N after this shader finishes?

  27. ________ What is this code doing? What is lightPos?
        uniformLoc = glGetUniformLocation(progObj, "lightPos");
        if (uniformLoc != -1)
            glUniform3fv(uniformLoc, 1, lightPos0Eye);

  28. _______ In a shader, what is the difference between a uniform variable and a varying variable?

  29. _______ In a shader, what does this code do: v.yxzw = v.xyzw ?

  30. ________ In the following code, the 2nd line clearly defines a nurbs curve.
     gluNurbsCurve(nurbsObject, 10, curveKnots, 2, curvePoints[0], 4, GLU_MAP1_TRIM_2);
    1. What is this curve being used for?

    2. The curve is being created from control points stored in curvePoints. In what coordinate space are those points defined?