CG iclicker questions 4

  1. What is happening in the following code that is part of a picking program that we saw (11_4):

    if(i==0) gl_FragColor = c[0];
      else if(i==1) gl_FragColor = c[1];
      else if(i==2) gl_FragColor = c[2];
      else if(i==3) gl_FragColor = c[3];
      else if(i==4) gl_FragColor = c[4];
      else if(i==5) gl_FragColor = c[5];
      else if(i==6) gl_FragColor = c[6];
    
    1. This assigns to each pixel the number that we'd like returned if the user clicks on that pixel.
    2. This assigns to each pixel the true color of that polygon.
    3. This keeps track of how many times the user clicked on that pixel.
    4. This notes how many vertices that polygon has.
    5. This notes the shininess exponent for that face.
  2. Radiosity is better than ray tracing when the scene is all

    1. diffuse objects
    2. objects outside the viewing region
    3. objects that are very close to the viewpoint
    4. specular objects
    5. very small objects
  3. Ray tracing is better than radiosity when the scene is all

    1. diffuse objects
    2. objects outside the viewing region
    3. objects that are very close to the viewpoint
    4. specular objects
    5. very small objects
  4. Firing multiple rays through each pixel handles the problem of

    1. diffuse objects
    2. objects outside the viewing region
    3. objects that are very close to the viewpoint
    4. specular objects
    5. very small objects
  5. Consider a 2D Cartesian cubic Bezier curve with these control points: (0,0), (0,1), (1,1), (1,0). What is the point at t=0? OK to look up the formula.

    1. (0,0)
    2. (0,1)
    3. (1,0)
    4. (1/2, 3/4)
    5. (1/2,1)
  6. What is the point at t=1/2?

    1. (0,0)
    2. (0,1)
    3. (1,0)
    4. (1/2, 3/4)
    5. (1/2,1)
  7. What is the point at t=1?

    1. (0,0)
    2. (0,1)
    3. (1,0)
    4. (1/2, 3/4)
    5. (1/2,1)
  8. If you interpolate a curve through a list of control points instead of approximating a curve near the points, then what happens?

    1. It will not be possible to join two curves and match the radii of curvature.
    2. The calculations to compute the curve will take impossibly long.
    3. The curve will stay within the convex hull of the control points.
    4. The curve will swing outside the convex hull of the control points.
    5. This isn't possible for curves of odd degree.
  9. If you use quadratic Bezier curves, then what happens?

    1. It will not be possible to join two curves and match the radii of curvature.
    2. The calculations to compute the curve will take impossibly long.
    3. The curve will stay within the convex hull of the control points.
    4. The curve will swing outside the convex hull of the control points.
    5. This isn't possible for curves of even degree.