Topics:
You will be making a program that draws a NURB to the screen. The control points for the NURB will be provided
in a text file. The file format will be 3 floating point numbers per line, 16 lines. It is designed to be
easily parsed via the ifstream class.
You may also hard-code the initial
values for the control points in your program.
Display the points in one sub window, and the NURB in another.
Allow the user to pick and move the control points. Once a control point is picked, the user may change its X, Y, Z location by pressing 6 different keys, one for increasing X, one for decreasing X, etc.
Make the NURBS window update when the user moves the points.
Map keyboard buttons to change the camera orientation to help the user view the changes that resulted from the control point changes.
As an alternative to the two window display you can display the NURB and the control points in one window. Provide a method for "turning off" the NURB in order to allow user access to all of the control points. Some might be hidden by the surface.
Via user input (keyboard or mouse) allow the user to apply a pre-defined texture map to your NURBS patch. Fill your texture array either with a function (e.g. sin, cos, mod, etc.), or load a raster image. The user should still be able to pick and move control points, which should then update the NURBS window.
Last modified March 15, 2010.