Topics:
Create a program that draws a flat-shaded tesselation of a bicubic Bezier
patch to the screen.
Compute the diffuse color of the Phong shading model for each triangle
on the patch.
The initial control points for the patch are provided
in a text file.
The file format will be 3 floating point numbers per
line, with 16 lines.
X-Y Ordering: [0,0], [1,0], [2,0], [3,0], [0,1], [1,1], [2,1], etc.
You may hard-code the control points in your program.
Tessellate the patch into triangles and calculate a surface normal and
diffuse color for each triangle.
Use at least one light source to shade the patch, which is near and connected to the camera.
Use an iterative, not recursive, evaluation technique to calculate
vertices on the patch.
Initially the patch should be sampled with a
10 x 10 resolution.
You will draw the patch and the control points (as GL_POINTS) for the patch.
Also draw the X, Y and Z axes. They should be drawn at the origin of the pathch's coordinate system. X axis should be drawn as a short red line. Y axis as short green line, and Z axis as a short blue line.
INTERACTION:
The patch should be in the middle of the window when your program starts.
The user should be able to change the view of the patch, and the camera
should always look at the patch.
Include a command to reset the view.
The user should have the capability to choose a control point to modify,
via keyboard interaction.
Change the color and/or size of the selected control point.
The user can then change the
location of the selected point via 6 keyboard
buttons (increase/decrease x/y/z position).
The user should be able to increase and decrease the sampling of the patch with a keyboard interaction.
Link to Initial Control Points
Link to smf file of tessellated patch, so you can see what yours should look like
Last modified March 11, 2017.