CS451: Advanced Computer Graphics
Spring 2008
|
Home |
Schedule |
Assignments |
Additional Resources
Programming Assignment 2: Procedural seashells
Due Thursday, Mar. 13
Overview
For this assignment, you will implement a procedural technique for
generating geometric models of seashells described by Fowler et al. 92.
0. Starter Code
Download the starter code and get it to
compile. You'll need to install the GLUT and FLTK libraries.
The mouse/key functions are as follows:
- Left mouse button: rotate
- Middle mouse button (or left and right held together): translate
- Right mouse button: zoom
- Space bar: reset to the initial view
- 'e' key: toggle drawing mesh edges
- 'c' key: toggle drawing coordinate system axes
- 'm' key: toggle between viewing modes (shell view or curve view)
- 'q' or 'Esc' key: quit
1. Splines (20%)
Write code to compute and draw a B-spline using the 10 control
points that may be positioned in the 'curve' viewing mode.
2. Frenet Frames (30%)
- Write code to compute the orthonormal axes defining the Frenet
frame at an arbitrary position along the helico spiral (i.e., for an
arbitrary value of the parameter t).
- Extend your program to visualize the Frenet frame at an
arbitrary parameter value (e.g., simply draw the coordinate axes as
small line segments).
- Write code for transforming points defined in the coordinate
system in which the generating curve is defined to the coordinate
system defined by the Frenet frame at an arbitrary position along
the helico spiral. In the notation used in Fowler 92, this transformation allows
mapping points in the (u,v,w) coordinate system to the (e_1, e_2,
e_3) coordinate system. It's OK to support only 2D generating
curves (i.e., w=0).
- Extend your program to draw the generating curve appropriately
scaled and aligned to the Frenet frame at an arbitrary parameter
value along the helico spiral.
3. Swept Surfaces (40%)
Write code to triangulate the surface of the shell by sweeping the
generating curve along the helico spiral. This is done by first
identifying n+1 evenly spaced points on the generating curve
(including its endpoints). Next, connect corresponding points for
consecutive positions of the generating curve along the spiral. Store
the resulting vertices and faces in the simple indexed face data
structure included in the starter code so that the shell will be
displayed during the normal rendering cycle. You may also want to
re-triangulate the surface whenever the parameters change that
determine its shape.
Ensure that you select the n+1 points so that they are evenly
spaced in terms of arc length, using the procedure outlined in Section
2.4 of the paper.
Also implement support for modulating the radial distance of the
generating curve as it is swept along the helico spiral as described
in Section 2.5 of the paper. This allows giving the surface a
sculpted shape like the examples in Figures 7, 8, 9, and 10.
4. Writeup and Analysis (10%)
Please submit your source code together with a writeup (as HTML) that
contains a description of the design decisions you made and results.
At a minimum, you should include screenshots of three different shells
you created with your system. Feel free to either try and model some
of the examples shown in the paper, create entirely new and
interesting shapes, or do a bit of both.
Extra Credit: Activator-Substrate Model for Pattern Generation (10%)
Implement the activator-substrate model described in Section 3.1
(or the activator-inhibitor model described in Section 3.2) to
generate color patterns for your shells. Experiment with the various
rates of decay and growth and include a discussion of these decisions
(along with screenshots) in your write-up.
Submitting
Please make your writeup and code accessible via the web, and send the
URL to rpw7e@cs.virginia.edu with "CS451" in the subject
line. Please see the general
notes on submitting your assignments, as well as the late policy and the collaboration policy.