BU
CAS
CS 480
Introduction to Computer Graphics
Spring 1997
Programming Assignment 4:
Shaded Display of Revolved Surfaces
Due before class on Tuesday April 8
The purpose of the assignment is to introduce you to 1) Bezier curve modeling,
2) surface modeling, and 3) basic 3-D shaded display in OpenGL.
The Program You Write
Write a program that allows the user to create and modify a revolved
surface defined by an open cubic Bezier profile curve. The axis of
rotation for the surface should be defined as the line between the
Bezier end points.
-
Your program should provide two separate windows: a 2-D curve editing
window, and a 3-D surface display window.
-
In the 2-D curve editing window, allow the user to create a cubic
Bezier curve and move the curve's control points. The user should be
able to select a control point by clicking the mouse on/near it. Once
selected, allow the user to drag the control point.
-
In the 3-D surface display window, provide smooth shaded display of the
resulting revolved surface. To achieve smooth shaded display,
you will need to calculate surface normals for each 3-D polygon vertex.
-
Once the user modifies the Bezier curve in the editing window, your
program should update the modified surface of revolution in the surface display
window.
-
Use the arrow keys to allow the user to increase/decrease the
number of polygons used to approximate the surface in both the U and V
parameter directions.
-
Give the user the ability to apply 3-D rotations to the
shaded object.
-
Be sure to use double buffering.
Hints
Be sure to look at the example Bezier curve and sphere shaded
rendering programs in the Red book.
On-line versions of these and other example programs are available on the
CGL cluster:
/usr2/cs480/courseware/book
/usr2/cs480/courseware/glut-3.0/progs/examples
Demos and Grading
Your project must run on the SGI, therefore you will need
to use one of the SGI workstations in the CGL cluster (unless you have
access to an OpenGL elsewhere).
Your program's source files are to be electronically submitted by using the submit program on cgl. The code you submit
should conform with the program assignment
guidelines.
Part of your grade for this programming assignment will be based on
your giving a short demo (2-3 minutes) in the CGL cluster. You will
be expected to talk about how your program works, and we will see
how well your program performs on some test examples. Demos will be
scheduled from 2-5 on the assignment due date.
Extra Credit
Apply a texture to your surface. Allow the user to toggle whether a
texture map is used or not.
Test Cases
You are responsible for testing your own code.
Page Created: Jan 2, 1997
Last Modified: Mar 27, 1997
Maintained by: Stan Sclaroff