Homework Questions

  1. The brightness (exposure) of a photographic image depends upon: (a) the amount of light entering the camera, as determined by the aperture; (b) the amount of film area that the entering light lands on; and (c) the exposure time. Note that the aperture diameter is often specified as a ratio of the focal length, thus an aperture setting of f/20 for a 200mm lens corresponds to an aperture diameter of 10mm.

    Consider images taken with two cameras, A and B, both focused to photograph objects far away. Camera A uses a 30mm x 20mm (width x height) film size, a 50mm lens, an aperture setting of f/5, and an exposure time of 1/25 sec. Camera B uses a larger format film size of 60mm x 40mm, a 100mm lens, and an aperture setting of f/10.

    What is the vertical field of view for each of camera A and B, measured in degrees? What exposure time should be used with camera B if is to produce an equivalent photographic exposure as camera A?

  2. Express the projection of point P(x,y,z) onto an image plane placed at distance d from the center of projection. I.e., give an expression for P'(x',y',z'). (see the left figure below)
      

  3. Shadows an important features to model. An easy way to render the shadows cast by an object onto the ground plane is to draw a version of the object that has been projected onto the ground plane, in an appropriately dark colour. If the direction of the light source is specified by a vector L, as shown above, compute the projected coordinates P'(x',y',z') of an object vertex P(x,y,z). Assume that you are projecting onto the xz plane, as shown below.

  4. For the scenario shown below, use graphical methods to determine where the image plane should be placed in order to produce a focussed image of the arrow.

    As the arrow is moved further away from the lens, does the image plane need to move towards the lens or away from the lens in order to remain focussed on the arrow?

  5. A Z-buffer algorithm will draw a given pixel if its Z value is less than the Z-value currently stored in the Z-buffer for that pixel, i.e., Z_pixel <= Z_buf[x,y]. Will the Z-buffer always produce the same image regardless of the way in which the primitives (polygons) are drawn?

  6. Derive the expressions for point P'(x',y'), obtained by rotating a point P(x,y) by theta degrees as shown below. Show that the transformation can be expressed as a 2x2 matrix multiplication.

  7. As in the previous question, determine a 2x2 transformation matrix that scales by a factor of A in the x-direction and B in the y-direction.

  8. A computer monitor displays a 1280x1024 image at 60 Hz, and that each pixel value is specified using 24 bits, i.e., 8 bits for each of R,G,B. What is the data bandwidth, in bytes-per-second, required to support the display? Suppose that for each pixel we also store a 24-bit Z-value, as well as another copy of the R,G,B pixel values (in order to "double-buffer"). How much memory is required for the frame buffer?

    1. Express point P in terms of both the coordinate frames shown.
    2. Find the 3x3 homogeneous transformation matrix which takes a point from Fa coordinates and expresses it in Fb coordinates.
    3. Verify your transformation using the coordinates given for point P.

  9. The point coordinate P, as shown below to the right, can be thought of as P = 3*i + 8*j, where i and j are basis vectors of unit length along the x and y axes, respectively. In effect, a coordinate system is defined by the location of its origin, and its basis vectors. Describe the point P in terms of the 5 other coordinate systems given below.
  10. Show that
       rot(z,theta1) rot(z,theta2) = rot(z,theta1 + theta2)

  11. Given the following transformation

       rot(z,90) trans(4,1,0)

    determine the values for x,y, and theta if the following transformation is to be identical:

       trans(x,y,0) rot(z, theta)

    Express the above transformations in terms of OpenGL commands.

  12. What does the following transformation do?
      [  0 -1 0 0 ]
      [ -1  0 0 0 ]
      [  0  0 1 0 ]
      [  0  0 0 1 ] 
    
    Illustrate your answer as well.

  13. Find the inverse of the following transformation matrix, assuming that the vectors A, B, and C are an orthonormal set. (Hint: there is a 'clean' solution).
      Ax Bx Cx Tx
      Ay By Cy Ty
      Az Bz Cz Tz
      0  0  0  1
    
  14. Draw a cavalier projection of a block of size x=2, y=3, z=4. Use a 30-degree projection, i.e., the projected negative z-axis should make a 30 degree angle with the x-axis.

  15. Give a projection matrix that produces the cavalier projection of the above question. Ensure that points lying in the xy-plane are unaltered by the projection.

  16. Derive the projection matrix for the oblique projection given by the view volume shown below. It should map the given view volume into the same NDC coordinate system used in OpenGL, namely one bounded by the cube -1<=x<=1, -1<=y<=1, -1<=z<=1. Assume that the view volume is not oblique when viewed from above.

  17. The gluViewport() function call is used to setup the transformation from normalized device coordinates to the display coordinate system, as shown below. Derive the necessary 2D transformation.


  18.  
  19. Suppose we wish to allow a user to translate the camera directly to the left and right, as shown in the figure below. When the user hits the left arrow key, the camera should move to the left, such that the object currently located at the center of the field of view and at a distance of 10 units should move to the right by 20 pixels. Assume a 512x512 image and a viewing frustum having a 30 degree horizontal field of view. How should the current viewing transformation be modified in order to implement the translation required by one press of the left arrow key?

  20. Consider the following scene with 7 blocks:


  21. Let T_n define the transformation of block n with respect to its parent in the hierarchy, so that P_CSparent = T_n P_CSn.

    For each block, determine the tranformation matrix required to transform its vertices to scene coordinates (CS0). Assuming that a block can be drawn using a function draw_block(), give the sequence of OpenGL function calls that might be used to draw the blocks, taking advantage of the matrix stack.

    Suppose we wished to mount our synthetic camera on block 4, aligned with coordinate system of block 4. Find the transformation matrix that transforms points from the coordinate system of block 6 to the camera coordinate system.

  22. Suppose an application allows the user to click on the perspective image of a set of objects in order to move or edit the objects. Given the location of a mouse click, the applications needs to determine which object was selected. One way of doing this is to determine the equation of the 3D line that projects to the selected image point. This line is then intersected with all the objects in the scene, and the closest intersecting object is then chosen as the object that the user selected.

    Given the pixel coordinates of the mouse in device coordinates (DCS), M(x,y), determine the equation of the line in viewing coordinates (VCS) system that projects to the given pixel. Assume that the following view volume was used:

    near   =  4
    far    =  10
    left   = -1
    right  =  1
    bottom = -1
    top    =  1
    

  23. Suppose a perspective view volume is defined by:
      near=1, far=4, left=-1, right=1, bottom=-1, top=1
    
    Clip the VCS line P1(0,2,0)P2 to this view volume. Perform your clipping computations in VCS.

  24. Assume a perspective view volume as defined for the above question. Assume a viewport image size of 800x800. Given the line AB having endpoints A(-1,-1,-4) B(0,-1,-10), determine:
    1. the midpoint of the projected line A'B'.
    2. the midpoint of the original line in terms of where it would project to in the image

  25. Develop an integer-only algorithm for rasterizing a circle C centred at (0,0) and of radius r, where r is an integer.

  26. BSP trees
    1. Build a BSP tree for the following scene using the polygons (shown as lines) as cutting planes. You should build your BSP tree by inserting the polygons into the BSP tree in alphabetical order. Represent the '+' side of each cutting plane as the right child and the '-' side as the left child.

    2. Use your BSP tree to produce a painter's algorithm ordering from the given eyepoint. Show your work.
    3. How will a BSP tree deal with 3 cyclically-overlapping polygons?

  27. For the scene shown below, sketch the graphs of the ambient, diffuse, specular, and total illumination seen by the eye for the two surfaces shown. Your graphs should sketch I as a function of x. Use the Phong illumination model given by:
       I = Iaka + kdIL(N.L) + kspecIL(R.V)n.
    where
      Ia = 1.0
      IL = 1.0
      ka = 0.1
      kd = 0.5
      kspec = 0.6
      n = 20

  28. Briefly describe the limitations of the Blinn and Phong illumination models.

  29. Using the CIE chromaticity diagram, show why cyan, magenta, and yellow can be considered the complementary colours for red, green, and blue.

  30. Sketch the colour gamut of a monitor having cyan, magenta, and yellow phosphours. Would this make a good monitor? Why or why not?

  31. A cubic parameter curve is defined using three points and one tangent vector:

    1. Derive the basis matrix for this type of curve.
    2. Give an expression for the geometric parameters of the Bezier curve which would produce the same curve, i.e., express Gbez as a function of G. You need not perform any simplifications.

  32. Show how to subdivide a Bezier curve into two halves, each also modeled by Bezier curves. Give an expression for the geometry vector of the first half of the curve.

  33. The appearance of a colour image depends on the display device. If an identical colour image is displayed on two colour monitors, why might the displayed result not be identical? List in point form as many reasons as you can think of, and be as specific as possible.