(toggle answers)
Name: _______________________________
Student ID: _______________________________

Total points: 110

These practice questions only cover the material since the second midterm; the actual final will cover the whole course. See the other practice exams for earlier material.

  1. How does Gouraud shading work? How does Phong shading work? What are pros/cons of each?
    Gouraud shading:
    Calculate shades at each vertex, interpolate RGB shades across the polygon
    Phong shading:
    Interpolate normal vectors across polygon; calculate shades at each pixel
    Phong shading looks better but requires more computation: the local illumination model is performed at each pixel across the polygon instead of just once for each vertex. Gouraud shading is built-in to OpenGL.
  2. Contrast texture maps, bump maps, and environment maps.
    Texture map:
    an image pasted on a surface in 3D. Colours of the surface are taken from the image.
    Bump map:
    the normal vectors on the surface are wobbled to simulate a perturbation of the surface (in/out) by an amount given in the bump map image.
    Environment map:
    reflections in specular surfaces use colours taken from an image, to simulate the reflection of a complex scene in a shiny object.
  3. What is an OpenGL texture object? How is one used? Why are they cool?
    A texture object represents an image loaded into the graphics card's texture memory. We can bind a number of texture objects with glBindTexture(), and load pixel values and set various parameters such as the wrapping mode and filtering for minimization/magnification. Then, when we wish to apply the texture to a surface, we simply call glBindTexture() again to set the OpenGL context to the appropriate texture object. This is very useful when we wish to use the same texture on multiple objects in a scene.
  4. Contrast the GL_OBJECT_LINEAR and GL_EYE_LINEAR modes of OpenGL automatic texture coordinate generation.
    With GL_OBJECT_LINEAR, the generated texcoords are in the model's coordinate system; i.e., the texture is fixed relative to the model. So if the model moves, the texture moves with it -- it is pasted on. With GL_EYE_LINEAR, the generated texcoords are fixed relative to the camera/eye coordinate system and not to the model. So if the model moves, it appears to "swim" in the texture -- as though the texture were projected by an LCD projector onto the object.
  5. What is mip-mapping? Why is it cool?
    Mip-maps are precalculated smaller versions of the texture at various levels of detail. e.g., a version with half the length and half the width; another version with one-quarter the length and one-quarter the width, etc. They are used in texture mapping to avoid aliasing: unsightly jagged edges and artifacts that would otherwise occur when the texture's projected fragment on the screen is very small.
  6. Recall that a parameterized curve in 3D is a function p(u) = [ x(u), y(u), z(u) ] (thought of as a column vector). Write the general form for a cubic polynomial curve in 3D.
    p(u) = Σk=03 (ck uk)
    = c0 + c1u + c2u2 + c3u3
    = Σk=03 [ cxk uk, cyk uk, czk uk ]

  7. What is a blending function for splines?
    A blending function describes the contribution each control point makes at each point along the curve. At each point the sum of all the blending curves should add up to 1.
  8. Contrast interpolating cubic polynomial curves, Hermite curves, and Bezier curves. For each type of cubic polynomial curve, what information is needed to uniquely specify a curve?
    Interpolating:
    Specify four points; the curve goes through all four.
    Hermite:
    Specify positions and tangent/velocity vectors at the start and end of the curve.
    Bezier:
    Specify four Bezier control points. Two are the start and end of the curve (interpolated). The other two control points are used to derive the velocity vectors (3 times the difference vector) for the start and end points.
  9. Describe and contrast C0, C1, C2, and G1 continuity for splines.
    C0:
    Curve segments touch; basic continuity.
    C1:
    Curves touch and velocity vectors also match at the joins
    C2:
    Curves touch, velocity vectors match, and even the curvatures match at the joins
    G1:
    Curves touch, and velocity vectors point in the same direction (but might not be the same magnitude). In between C0 and C1.
  10. Suppose a Bezier curve has already been defined in an OpenGL evaluator using glMap1f(). Write OpenGL drawing code to plot the curve from u=0 to u=1.
    glBegin( GL_LINE_STRIP );
    for (GLfloat u=0; u<1.0; u += 0.02)
    	glEvalCoord1f( u );
    glEnd();
    
  11. What is a NURBS? Explain each part of the acronym in detail.
    NU (non-uniform):
    the knots (joins between Bezier segments) need not be uniformly spaced in u (the parameter space). For instance, this can be used to make the NURBS interpolate its endpoints, by repeating knots four times at the start (u=0) and end (u=1).
    R (rational):
    Each control point has a relative weighting associated with it which biases its influence on the curve.
    BS (B-spline, Bezier spline):
    A B-spline is a spline made up of cubic Bezier segments, joined in a particular way so as to get C2 continuity.
  12. What are shadow rays? Why is it important to optimize their intersection tests?
    Every time a ray (either cast from the camera or recursively produced via reflection/refraction) strikes a surface, shadow rays get sent to each light source. If the shadow ray intersects an opaque surface, that light source does not contribute to the local diffuse illumination at that patch. The number of shadow rays cast is usually much more than the number of reflection/refraction rays cast.
  13. Describe how to find all the intersection points between a ray and a sphere.
    Equation of a sphere with radius r and centre (xc, yc, zc):
  14. What are quadric surfaces, and why are they cool in raytracing? List some examples.
    A quadric is any implicit surface that is defined by a quadratic (degree 2 polynomial) in x, y, and z. Examples include spheres, ellipses, cylinders, cones, and hyperboloids. The ray-surface intersection test, so critical in raytracing, is analytically solvable for quadrics, using the quadratic formula. As a result, finding intersections with quadrics is relatively easy, which speeds up raytracing.
  15. Contrast axis-aligned and oriented bounding boxes. What are they used for?
    The sides of axis-aligned bounding boxes are parallel to the coordinate frame (x,y,z). Oriented bounding boxes can be oriented in any way. Both can be used to simplify geometry to speed up ray-surface intersection tests in raytracing, or for collision detection, etc.
  16. Describe and contrast: spatial grids, octrees, k-d trees, and BSP trees.
    Grids:
    subdivide space into equal voxels, regularly spaced
    Octrees:
    Adaptive subdivision: where needed, each cell is subdivided into eight equal subcells along the coordinate axes.
    k-d trees:
    Also adaptive like octrees, but cells are subdivided along one axis at a time. Cells need not be split into equal-size subcells.
    BSP trees:
    Even more flexible than k-d trees: each time a cell is split using a (k-1)-dimensional hyperplane (a regular plane in 3D), oriented in any way (need not be along a coordinate axis).
  17. What are the basic assumptions for classical radiosity?
    Most important assumption: Lambertian (perfectly diffuse) surfaces -- no specularity, no translucency. Other assumptions (not so important to get): light transfer from one element to another is linear, no fog, can solve for radiosity in RGB space, radiosity constant across each element.
  18. What is radiant power? What are the SI units used to describe it?
    Light energy per unit time: rate at which light energy is transmitted. In watts (W), which is the same as Joules/second (J/s).
  19. What is radiosity? (in physics/optics/radiometry)
    Exitant flux density: radiant power per unit surface area.
  20. Explain what a BRDF is. What simplifying assumption is made about the BRDF in classical radiosity? What sort of surfaces is radiosity unable to model as a result?
    Bidirectional reflectance distribution function: defines for every combination of an incoming direction and an outgoing direction, what fraction of the incoming flux density along the given incoming direction is reflected along the given outgoing direction. In general, the BRDF varies along the surface and also varies with both incoming and outgoing direction vectors. Radiosity assumes Lambertian surfaces, which means that the BRDF simplifies to a constant, called the albedo.
  21. Explain what albedo is. Give examples of surfaces that might have high or low albedo.
    Albedo is the ratio of outgoing reflected radiosity to incoming irradiance: in other words, how much of incoming light is reflected back. Albedo is averaged over all incoming and outgoing direction vectors. High albedo: snow, sand. Low albedo: dirt, trees. (Albedo is not so easy to estimate for highly specular surfaces like glass or water, because all directions need to be considered, including those not along the reflection ray.)
  22. Describe the general radiosity equation describing the interaction between a given surface element i and all other surface elements j.
    Ai Bi = Ai Ei + ρi Σj ( Fji Aj Bj ), where:
    Ai
    is the area of element i,
    Bi
    is the radiosity of element i (what we're solving for),
    Ei
    is the emittance (irradiance) from element i,
    ρi
    is the albedo (reflectance) of element i, and
    Fji
    is the visibility form-factor from element j to element i
  23. Contrast and describe pros/cons: realtime OpenGL pipeline, vs. ray tracing, vs. radiosity.