CSE 167 - Introduction
to Computer Graphics - Fall 2003
Instructor: Sam Buss, Univ. of California, San Diego
Project #3 - Build a 3D wire-frame scene with an ellipsoid top and some other geometry.
Due Date: Friday, November 7, midnight. (Firm!))
Goals: Learn how to create a parametric surface (namely, a portion of an ellipsoid) using quad strips and/or triangle fans or strips. Learn how to model simple scenes with the supplied GLUT shapes such as spheres, cones, etc. Find out culling of back faces works. Find out how to toggle wireframe mode. Discover that wireframe objects, especially when combined with animation can look very three dimensional. However, flat, solidly colored objects look much too flat and non-three-dimensional.
What to hand in: (1) Make a directory called
WireFrameScene in your CSE 167 home directory. (The CSE 167 home directory on
ieng9, under Class Resources, not your "My Documents"
file modification dates will serve as a time stamp so we will know files have
been turned in on time. Place, in that directory, all your source
files and project files (including .dsp and .dsw files). Also
place there a screenshot of your scene.
(2) You must upload also, a thumbnail GIF file, a full size screenshot and a very simple HTML file using a web page described below. This will collect the entire class's projects into a web page that will be made accessible on the web.
As usual, grading will be personalized and one-on-one with a TA or with Sam Buss. Your program must run on the PC lab, you must come into the PC lab and meet one of us. You will have to show your source code, run the program, possibly make changes on the spot to your program and recompile as requested by the grader, and be able to explain how your program works and why it renders what it does. Your files should be complete and project must recompile in the ieng9 directory. You will then come see a TA to get your work graded. This grading MUST be done by Friday, November 14, and we prefer that it be done earlier.
FOR THIS PROJECT #3, DO THE FOLLOWING STEPS #1 - #6.
1. Download files from the web, at
. This zip file contains four files: (1&2) C++ source files
WireFrameScene.cpp and WireFrameScene.h, (3) an
executable WireFrameScene.exe, and (4) a template
index.html file for later turning-in. You can also get these files
from the folder Fall03WireFrameScene in the course public
directory on ieng9.
Run the executable file on a PC. You will see a scene with a mushroom like shape and a letter "S". (That's my initial.). Note the following commands act on the scene:
Your job is to re-create this program -- sort of!!. You will re-create the mushroom exactly, and form something creative based on your own first initial instead of the "S".
2. Form a new project and workspace. Include the two source files in it. The supplied source code handles all the keystroke commands, and draws the flat base plane, and the cone-shaped stalk of the mushroom. It has empty routines that will be used to form the ellipsoidal surface and the geometry based on your initials. For information on how to build a new project, read this handout on starting a new Visual C++ 6.0 program.
3. Rewrite the code that generates the mushroom cap. This is the
top portion of an ellipsoid, generated as a parametric surface. The
ellipsoid has radii 2 (in the x direction) and 1 and 1 (in the y
and z directions). The parametric equation for the ellipsoid is
< 2*cos(phi)*sin(theta), sin(phi), cos(phi)*cos(theta) > and it is
translated to be centered at <2,1,0>. Here, the heading parameter
theta varies from 0 to 360 degrees (or, 0 to 2*pi); and the azimuth
parameter phi varies from 15 degrees to 90 degrees (so only the
upper 75 degrees of the ellipsoid is rendered).
You should use quad strips and/or triangle strips and/or triangle fans to build the ellipsoid.
4. Design some geometric shapes that are based (*loosely* based is OK) on the first initial of your first name. Do something creative so no two of you have the same geometry. Suggestions: use the glutSolid objects, such as spheres, cones, dodecahedra, tori, etc. to build your objects. The course web page has pointers to GLUT documentation that describes how to call these routines. The glutSolid... objects will be automatically rendered in wireframe mode when wireframe mode is activated. You may also use quad strips, triangle fans, etc. if you wish. The geometric shapes should be solid (i.e., they should not consist of points and lines).
5. Leave the mushroom stalk and the base plane the same as they are in the supplied code. Your finished program should look the same as the supplied executable, except the "S" is replaced by your own creation.
6. Make a screen shot and a thumbnail gif, then turn everything in. Here is a page with detailed turn-in instructions.
Grading is on a scale of 1-8 as usual.