CS160 Extra Credit Program
Due Wednesday, November 31, 2001 MIDNIGHT
Submit EC directory using CATS Submit Program
Demonstrate program to Narayan before due date.
NO LATE PROGRAMS ACCEPTED. NO EARLY DAYS GIVEN.
Objectives:
The objective of this assignment is to make up for poor scores
on previous assignments. You can add up to 50 points to your
score and you can't add points beyond the maximum of 300 for
3 assignments.
You must demo this assigment to narayan for grading, as well
as submitting the files.
Assignment:
-
Cubic Spline Curve (20 points):
Allow the user to position 10 small spheres interactively.
(A simple way to do this is to have the spheres replace the
objects in assignment 2.) Using the formula for bezier curves,
draw 3 piecewise curves using the 10 spheres as control points.
The first curve should be red, the second green, and the
third blue. There should be 50 line segments in each curve.
The curves should be C0 continuous. The curves should change
as the user moves the control spheres.
-
Cubic Spline Surface (20 points):
Start with a grid of 10 x 10 tiny white spheres in a plane. Connect the
spheres together with a mesh of straight lines.
Also use the spheres as control points for a
3x3 piecewise bezier surface. Draw the bezier surface in red,
as a mesh with 10 line segments in each direction for each piece of
the bezier surface. I.e., each of the 3 bezier patches will
consist of a grid of 10x10 quadrilaterals.
Allow the user to select any one of the spheres
interactively, and make it turn green. The user should be able
to translate the active green sphere in x, y, and z.
This will change the white lines of the control mesh and the
red bezier surface. (20 points)
For 10 extra points, draw the surface using polygon shading,
with 100 polygons for each bezier patch.
- You MUST use C or C++ to do this and you MUST submit a program that
compiles and runs on the BE 105 Suns. You MUST also demonstrate
the program to Narayan for grading.
- Submission must be done using
the submit utility from CATS. Run "quickhelp submit"
on a CATS machine to get more info on the submit command. Here's
what you'll need to do when submitting the assignment.
I will delete points for submitting anything except the required
.c, .h, .fd, Makefile, and README files.
- Create a DIRECTORY called "
ec". It should
contain all the files required to make your program
compile/run. It should also contain an ascii README file
explaining how your program works.
- Run "
make clean" in the directory to ensure you
do not submit .o files, core files, or the compiled program.
- From ec's parent directory (if you are in the ec
directory, type "
cd .."), tar the directory with
the command "tar cvf ec.tar prog3".
- Compress the tar file with the command
"
gzip ec.tar". This will produce the file
"ec.tar.gz" which you will submit.
- To submit your solution, use the command
"
submit cmps160.f00 ec ec.tar.gz"
Questions? E-mail Narayan Brooks