CS 354 Computer Graphics

Project #2 – Interactive design and display of smooth curves and surfaces

Assigned - October 5

Due - October 25(Midnight)

Goal

You are to create an interactive program for drawing a quadratic spline curve and a smoothed 3D polyhedrons using simple subdivision rules. A quadric spline curve should be specified as a polyline or polygon, that is a sequence of control points entered using mouse clicks. There must be at least three control points input. Each line segment between two control points is subdivided into three segments of equal length. Thus you will get two new control points between every adjacent pair of current control points, after each step of subdivision. Connect the new control points closest to each current control point of adjacent segments and obtain a new polyline or polygon. Repeatedly apply this subdivision rule on the new polyline/polygon until you obtain a smooth polyline/polygon display.

Another part of this project is to display a smoothed 3D polyhedron by repeating the following simple mid-edge subdivision rule: Connect every current edge midpoint to the midpoints of the four edges that share both a vertex and a face with the current edge. Once all edge midpoints are linked, the old mesh is discarded. The input 3D polyhedron could be the one you created in your first assignment or others as long as it’s read in from a VRML file.

You should be able to display the result of the subdivision steps by using a key or the mouse, so that the change in the curve or surface is evident after every subdivision step. Furthermore, the user interface in your program should include a sub-menu which can toggle the drawing between the curve and surface cases. Also another sub-menu should let the user clear the display window.

More Information

We will assume students are familiar with Xwindows or whatever alternative GUI programming environment (e.g. GLUT library, Tcl/Tk, Motif etc.) they plan to use. From the experience of first assignment, the GLUT library will be very helpful for Xwindows .

Reference book

Neider, Davis and Woo, "OpenGL Programming Guide" Third Edition, Addison-Wesley

Questions Related to Project (10% of project score)

(1). What are the similarities and differences between the above recursive subdivisions and fractals?

(2). What are the limit shapes of the above recursive subdivisions for both a square and a cube?

What to turn in

This has been explained clearly in the course home page (http://www.cs.utexas.edu/users/rkolluri/cs354).

Extra Credit

You will get 5 extra points for a well designed user interface as well as well documented code. You are encouraged to use documentation tools such as noweb or doc ++