CSCE 4230 Program #6 Due date: Thursday, April 30, 2009 Write an OpenGL program that displays a two-segment piecewise cubic (degree-3) Bezier space curve with continuous tangent vector at every point: control points P0, P1, ..., P6, where P2, P3, and P4 are collinear. Refer to Chapter 12 and bezcurve.c in the Redbook for an example of a one-segment Bezier curve. An interactive user must be allowed to zoom in or out, and to alter the viewing transformations with arrow keys and/or the mouse. Choose a default initial set of values for the seven control points, and allow the user to alter any one of them by dragging it with the mouse. You might allow the user to select a control point by specifying its index (with a keypress or from the menu), in which case the control points must be labeled with their indices). Alternatively, you may allow mouse selection by left- clicking on a point sufficiently close to the window coordinates of a control point. Refer to functions gluProject and gluUnProject. If one of the three collinear control points is moved, collinearity must be restored by, for example, setting P3 to the midpoint between P2 and P4, or projecting one of them onto the line defined by the other two. Name your source code file Lastname_6.c or Lastname_6.cpp, where Lastname is your last name, and email it to the grader, Ismail Mohammed: im0058@unt.edu. Also, hand in a source code listing (with your name on it), at the beginning of class on the due date.