Graphics B-Exam January 1996
- 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.
- 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.
- 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.
- Write a program to draw the Nth level of this curve.
- Compute the following:
- The fractal dimension of the curve.
- The perimeter of the curve.
- The area inside the curve.
- Explain the difference between ambient light, diffuse reflection, and specular reflection.
- 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.