Exercise 5

Number of Points 100
Due Date Tuesday, November 29, 2005, before class (Problem 1)
Tuesday, November 29, 2005

Please do the following problems:

Here comes your job:

Modify draw.c so that it can display the computation and intermediate results of de Boor's algorithm. Since you have done the curve case, extending it to surfaces would not be a difficult job. Here are some more details:

  1. Pick one direction, say the u-direction, and apply de Boor's algorithm to some columns at u whose value is provided to you from a global variable. For each column, display all intermediate polylines. This generates a set of new points.
  2. Apply de Boor's algorithm to this set of points at v and display all intermediate polylines. This generates a single point, the point on the surface. The value of v is also available from a global variable. Refer to Tracing the Surface - de Casteljau's and de Boor's Algorithms of DesignMentor to see the actual effect of the de Boor's algorithm.
  3. Display the point on the surface with a sphere.
  4. Color the involved control points and the portion of control net with a different color. Without doing this part, you will lose 10 points.
  5. Note that, in both directions, de Boor's algorithm does not use all control points as you have learned from the curve case. You will receive maximum 25 points if you use all control points in de Boor's algorithm.

With a correct implementation, you can drag to rotate the generated B-spline surface and use the left-, right-, up- and down-arrow keys to increase and decrease the value of u and v. Then, the computation of de Boor's algorithm will be shown vividly on screen.

Here are important notes for this exercise.