Project 3 Info Page

Sample Solution

A sample solution for project 3 has been posted on the webpage.  Although it contains a few features (like drawing normals, patch evaluation visualization, etc..) that you are not required to implement, otherwise it should be a good reference for you. You ARE required to draw the control polygon and wire frame.

Sample Patch

A sample bezier patch has been provided for you in the Project 3 specifications.  It's the same one featured in the sample solution.  The order of the points corresponds to the order specified on slide 27 of lecture 13.

Drawing Lines & Points in OpenGL

To draw lines in opengl, try glBegin(GL_LINE_STRIP).  To draw points, try glBegin(GL_POINTS).  Vertices are specified the same way you would when drawing triangles.

Implementation

It's your choice whether or not to implement the de Casteljau algorithm, the cubic form, or the matrix form for evaluating a curve.  They all achieve equivalent results.  Check lecture 13 for both point and tangent formulas.

Tangents

If you're using the matrix form for 2D patch evaluation, obtaining both tangents in 's' and 't' should be straightforward from the notes provided in lecture 13. For those of you evaluating your surface with curves, in order to get the proper tangent in both the s and t directions, it's necessary to interpolate BOTH the points AND the tangents in the last steps of your patch evaluation algorithm.

Bezier Patch Evaluation Visualization

The sample solution comes with a visualization about evaluating a single pont on a bezier patch (check the console for directions).  It evaluates the point using successive curves, evaluating first in 's' then in 't'.  The intent is to help you understand what goes into evaluating a single point on a bezier surface.  Note that if you're solving the patch points using the matrix method, this visualization may not be helpful for you.  You are NOT required to implement any of it for this project.

As an example, lets assume you're looking for a particular point s=0.25 & t=0.75 (the big green point).  You evaluate your first 4 curves in the 's' direction (along the yellow curves).  You now have 4 new POINTS (yellow points) and 4 new TANGENTS (blue tangents) in 's'.  These 4 POINTS describe a curve on the surface in the 't' direction (purple curve with green control polyline; these green lines connect the 4 yellow POINTS).  Interpolating the POINTS in 't' yields the final point on the curve (green point) and the tangent in the 't' direction (cyan tangent).

But we still need the tangent in the 's' direction at that point (red tangent).  To do this, we interpolate the TANGENTS as if they were points on a curve, using the same 't' value as before.  On the visualization, you could say this red tangent is obtained by interpolating the green TANGENTS at 't'.

In the description above, I capitalize POINTS and TANGENTS because they always refer to the same set of points and tangents. I just want to make that clear. Hope this helps. 

As a courtesy to Steve and Wojtiech, all questions regarding the visualization should go through me. Thanks, -Alex