next up previous
Next: About this document ...

CS4731- Term C, 2009
Computer Graphics

Lectures: SL 305, Mondays and Thursdays, 1:00-2:50PM

Instructor: Prof. Matthew Ward, FL-231, 508-831-5671, matt@cs
Office Hours: Monday and Thursday: 11AM, Tuesday and Friday: 2PM, Others by appointment

Teaching Assistants: Paolo de Barros, FL-XXX, 508-831-2687, pgb@wpi
Office Hours(FL-A22): Mondays 4-6PM, Wednesdays 5-6PM, Thursdays 9-11AM
Jeff Moffett, FL-A21, 508-831-5951, jeffmoffett@wpi
Office Hours(FL-A22): Mondays 3-4PM, Tuesdays 12-2PM, Wednesdays 2-4PM

Course Objectives: The goal of this course is to study the use of computers to model and graphically render two- and three-dimensional structures. Topics include graphics devices and languages, 2- and 3-D object representations, and various aspects of rendering realistic images. Students will be expected to implement programs that span all stages of the 3-D graphics pipeline, including modeling, arbitrary viewing, clipping, projection, hidden surface removal, and shading.

Text: The primary text for the course is Computer Graphics: Theory into Practice, by Jeffrey McConnell. Alternate textbooks will be placed on reserve in the library, which may assist you in understanding some of the more difficult concepts.

Software: You may develop your programs in Java or C++ (in the latter case, using bindings to OpenGL). Note that this is not a course in OpenGL, and you will not be using any of the 3D graphics components of this or similar libraries. The goal is for you to write your own reduced version of a graphics library. Sample programs and Makefiles in Java and C++/OpenGL for generating some basic graphics displays can be found in the software folder on the CS4731 myWPI page. It is STRONGLY suggested that you try these demos out as soon as possible to make sure you are able to build and execute graphics programs.

Grade Policy: 50% exams, 50% assignments, though low grades early in the term may be forgiven in cases where students are performing very well at the end of the course. You must obtain a passing grade for both the exam portion and project portion in order to pass this class. As a rough rule of thumb, I consider a grade of 65 to be the cut-off between passing and failing, though this may shift a bit from course to course.

Supplemental Material: All handouts and tutorials can be found on the CS4731 myWPI page.

Notes:

  1. Reading is mandatory, working ahead is encouraged.

  2. Exams are based on both lectures and readings, so class attendance is strongly encouraged, as well as keeping up with the reading. Over-sleeping is NOT an acceptable excuse for missing an exam.

  3. Working in pairs is OK, but as mentioned above, in order to pass the course you must pass both the assignment and exam components. Please keep the TAs informed as to the person with whom you are partners. You may only change partners once, and this can be accomplished at a no-fault divorce hearing to be held after the third assignment. Each person must have his or her own object models, but the programs can be developed with your partner.

  4. Cheating, defined as taking credit for work you did not do, is strictly forbidden. First offenders will receive a zero grade for the assignment or exam in question, and the Dean of Students office will be informed. Repeat offenders will receive an NR for the course and the case will be brought before the Campus Hearing Board (see Student Handbook).

  5. All assignments should be submitted using myWPI. Files MUST include instructions on compiling and running the program and should be WELL documented. Insufficient documentation will result in loss of points (as much as 25% of the assignment). Data files should include a comment line at the start giving your name, the assignment for which it is intended, and the most recent date that the file was changed. Please, do NOT turn in executables! Any questions regarding the assignments may be sent to either the TAs or me via e-mail, or you may stop by during our posted office hours.

  6. I expect all students to exhibit proper courtesy in the classroom. Activities such as texting friends, playing games, checking e-mail, viewing videos, reading blogs, and sleeping are distractions to those around you, as well as considered rude by this instructor, and should be reserved for outside the classroom. Cell phones should be turned off or at least switched to silent mode during class time. If you're in the habit of using a laptop to take notes, I'd suggest that for this course, a pad of paper and a pen (perhaps multiple colored pens) would be more useful, given the number of equations and sketches that will be presented and discussed.

Projects: The term project involves the modeling and rendering of a land vehicle of your design sitting on a terrain that will be provided to you. For those of you continuing on to CS 4732, these vehicles will be used in races across this terrain. For now, though, we will focus on static scenes. Your vehicle should have at least 6 components to it, each of which you will be responsible for modeling as individual parts that are then combined into a composite object. You can start with simplistic shapes, but as the term progresses I would expect your models to increase in their sophistication. Obviously, if you are taking CS 4732 next term you should consider designing the components with dynamic behavior in mind.

You should keep the level of detail and complexity in your object low until you get the basic functionality down, and then use your imagination to make it as interesting as you wish. For example, a basic vehicle could be approximated with a number of cylinders, boxes and spheres, and later enhanced by varying sizes, shapes, and detail. Don't get too detailed, though, as it can end up consuming a lot of your time, both in design and execution. We will be separating the modeling and rendering phases of the work, thus allowing each to progress relatively independently. You will be responsible for creating a data file (format described in the file format.model) containing the detailed description of your object. This should be generated via a modeling program that describes the object by its constituent components, including their location, size, orientation, and color, and outputs lists of vertices, edges (defined by 2 vertices), and polygons (defined by a list of edges, a color, and an orientation). This will then be used as input to a rendering program. The idea is that any of the rendering programs that result should be able to work with any of the data files generated. More details and hints will be provided as the term progresses. The rough breakdown, with due dates, is shown below. Late assignments (turned in after noon of the due date) will be penalized 10 percent per day.

Phase 1: (Warm Up - 10 pts): due 1/22/09 at 12:00 noon: using simple graphics primitives, as in the demo programs found in the software directory of the cs4731 myWPI site, write a program that draws a 2-D image of your preliminary vehicle (you can make it as simple as you want - this is just an exercise to write your first graphics program).

Phase 2: (Model2D - 15 pts): due 2/3/09 at 12:00 noon: write a program that creates a data file in the format specified in the file format.model in the documents folder on myWPI that contains a 2-D description of your vehicle. The best way to attack this problem is by using multiple instances of simple shapes with varying position, orientation, and size. Assign the z-coordinate of all points to be 0.0. Start to develop a simple rendering program (to be due on 2/10) that reads in the data file, scans through the edge list, and after converting the endpoints to device coordinates, draws all edges on the screen. Again, z-coordinates can be ignored. You will need to specify the world and screen coordinate bounds using the view file format described in the file format.view in the documents folder. You can ignore the other parts of that file format for now. Clipping and interactive window/viewport selection is not necessary, but is an option for those looking for a challenge. Note: to simplify rendering different models with a single program, you should keep the coordinates of your vertices in the range 0 to 1000.

Phase 3: (Model3D and Render1 - 20 pts): due 2/10/09 at 12:00 noon: extend your model to be 3-D. Each polygon should be described in terms of its edges, and each edge by its two points. It is best to restrict regions (especially those on curved surfaces) to be 3 sided. This will make shading computations much easier and avoid the possibility of inadvertently making non-planar regions. Note that any polygon with more than 3 sides can be readily broken down to a set of triangles. Render1 should allow generation of 3 views of your vehicle (xy, xz, yz views) by simply ignoring one of the coordinates for each view and using the other 2 coordinates to map to the screen x and y coordinates.

Phase 4: (Render2 and surface normals - 25 pts): due 2/19/09 at 12:00 noon: extend Render1 to implement perspective and parallel projections and arbitrary views. For perspective projection you will have to specify the location of the view reference point (the location of the center of the plane of projection) and the camera/eye (often specified as a distance behind the plane of projection). A unique view can be specified with a single point (view reference point) and two vectors (direction to your vehicle and an UP vector to indicate the tilt of the camera/eye), although other modes of view specification will be considered. In addition, you should extend your renderer to import a terrain that we will provide (a grid of elevations that you can generate triangles from). Place your vehicle at the center of the terrain, as close to the surface as possible. If you have time, consider rotating your vehicle so it is oriented with the slope of the terrain at the point(s) of ground contact. Finally, you should compute the surface normal for each region and fill it into your data file. Make sure the normal points outward. One way to check this is to draw an extra line for each polygon that starts at the center of the polygon and goes in the direction of the surface normal. An object with correct normals will look a bit like a porcupine!

Phase 5: (Render3 - 30 pts): due 3/5/09 at 12:00 noon: extend Render2 to perform hidden surface removal and shading. The technique you choose is up to you, so you should study the possibilities CAREFULLY before choosing. A scan-line algorithm for region filling that can be adapted for both purposes has been provided to you. Alternately, you may choose to do depth-sorting with filled polygon routines, z-buffering, ray tracing, or whatever your fancy. Implement flat shading first. If you have time you can consider interpolated shading, shadows, textures, or other surface characteristics.

Schedule:

Week 1 (January 15-22)
   Topics: Overview, Basic HW/SW
   Reading: Ch. 1 

Week 2 (January 23 - 29)
   Topics: Light and Shading, Transformations
   Reading: Ch. 2, 3.1

Week 3 (January 30 - February 5)
   Topics: Projections, Modeling
   Reading: Ch. 3.2 - 3.7

Week 4 (February 6 - February 12)
   Topics: Curves and Curved Surfaces
   Reading: Ch. 4
   Midterm Exam 

Week 5 (February 13 - 24)
   Topics: Clipping and Hidden Surface Removal
   Reading: Ch. 5

Week 6 (February 25- March 2)
   Topics: Textures
   Reading: Ch. 6

Week 7 (March 3-6)
   Topics: Advanced Topics
   Reading: Ch. 7-9
   Final Exam



next up previous
Next: About this document ...
Matthew Ward 2009-01-20