Graphics B-Exam January 1996

  1. Develop a Bresenham--like algorithm for scan converting the parabola y = x2/2a for -a <= x <= a. You may assume that a is an integer. Your algorithm should use only integer variables and addition. Please be sure to provide a diagram to illustrate how your algorithm selects pixels.
  2. Construct an algorithm to clip lines to a circular window. The circle is defined by a radius R and a center point C = (a, b) lying in the xy--plane. The lines are defined by their end points. Develop all the formulas you need for quick accept reject tests and intersection computations.
  3. Starting with the outline of a square, consider iterating the procedure which replaces each straight line segment by a square bump whose sides are 1/3 the size of the original segment (see Figure 1).

    Figure 1: A square bump placed on each side of a square.

    1. Write a program to draw the Nth level of this curve.
    2. Compute the following:
      1. The fractal dimension of the curve.
      2. The perimeter of the curve.
      3. The area inside the curve.
    1. Explain the difference between ambient light, diffuse reflection, and specular reflection.
    2. Consider Figure 2 below. Give formulas for the contributions to the overall intensity at P of the ambient light, the diffuse reflection, and the specular reflection in terms of the vectors L, V, N and the intensity I of the light source.

      Figure 2: At the point P on the surface S, the vector L points to the light source, the vector V points towards the viewer's eye, and the vector N is normal to the surface S.

[UP] [CSGSA]