Homework 9

22C:151 Introduction to Computer Graphics
Due Thursday, December 11, 2003
(20 points)

Write a program that allows mouse-based interactive editing and display of 2D interpolating cubic, Bezier, and B-spline curves based on four control points.

You may use either 1 or 3 OpenGL windows. If you use 1 window, divide it into three regions, one for each curve (draw a solid line or something, so that the regions are clear). If you want to use 3 windows and can't figure it out from the book, let me know; it's not difficult.

Each region (or window) should show the same arrangement of control points; there are simply 3 "copies" of the same set of control points. In one region you should draw an interpolating curve through the control points. The other two regions will display Bezier and B splines for the same control points. Thus, at all times you'll be able to see the three different curves corresponding to the given control points.

You may initialize your program so that three copies of an initial set of four control points are displayed when the program starts (in other words, it is not required that you interactively enter the initial locations of the control points).

Requirements:

Submitting your program

Submit your assignment according to the guidelines on the class WWW home page. For the on-line part of the submission, respond 'hw9' to the ``Location:'' request.