In this lab you'll develop code to compute and draw a Catmull-Rom spline and a Bezier curve. Start by downloading the sample executable catmullRom.exe. When you run the program, you'll find 4 control points and their associated curve. You can move the "current" control point, which is highlighted in white, by using the x,X,y,Y,z, and Z keys. You can change the "current" control point by using the n and N keys. The "h" key explains key controls. You can change the camera position using the mouse.
You are going to create your own version of this program. Download the starting code here. Create a new visual studio project then build and run the executable.
You need to complete the drawCurve() function to
Finally, implement a Bezier curve modeler. Use as much code from your catmull-rom modeler as you can. Start with 4 control points then extend to 7 (2 curves) with C1 continuity. (Note: When the user moves particular control points you will have to move a second as well to ensure C1 continuity.)
Save your work. You will use your Bezier modeler as the basis for the next lab on picking.