Computer Graphics




Course Schedule

Projects 0-5
- Schedule

Project 6
- 2008 Gallery
- 2007 Gallery


Honor Code



Williams College

CS Dept

Graphics @ Williams


Instructor:Prof. McGuire TA:Eric Muller Lecture:TCL 206 MWF 12pm Course:CSCI 371
Office Hours:TCL 308 M 10-11am
TCL 308 M 2:30-4pm
TCL 312 R 7-8pm
TA Hours:TCL 312 MT 10p-12a
TCL 312 WR 9p-12a
Lab:TCL 206 Wed 1pm Sem:Fall 2008

Description: PhotoShop, medical MRIs, video games, and movie special effects all programatically create and manipulate digital images. This course teaches the fundamental techniques behind these applications. We begin by building a mathematical model of the interaction of light with surfaces, lenses, and an imager. We then study the data structures and processor architectures that allow us to efficiently evaluate that physical model. Students will complete a series of programming assignments for both photorealistic image creation and real-time 3D rendering using C++, OpenGL, and GLSL. These assignments cumulate in a multi-week final project. Topics covered in the course include: projective geometry, ray tracing, bidirectional surface scattering functions, binary space partition trees, matting and compositing, shadow maps, cache management, and parallel processing on GPUs.

Format: Lecture, with optics laboratory exercises and programming projects.

Fulfills the Quantitative Reasoning and CS Project Course requirements.

Prerequisites: Computer Science 136 or equivalent programming experience, and Mathematics 211 (may be taken concurrently) OR permission of the instructor.

Texbook: Real-Time Rendering, 3rd Edition by Akenine-Möller and Haines, $89. Available from Water Street Books, A K Peters and Additional reading material will be provided throughout the semester at no cost.

I recommend Physically Based Rendering : From Theory to Implementation by Pharr and Humphreys and Mathematics for 3D Game Programming and Computer Graphics, 2nd Edition by Lengyel, depending on your choice of final project, but these are not assigned reading in the course.

Memorial room of the Sponza Palace photographed by Claire Gray. Look at that gorgeous indirect illumination and multiple scattering in the participating medium!

Class/Lab Effort15%

In-lab exercises and in-lecture effort are graded A/C/fail. A `C' grade means that you were in the room and did something reasonable. An `A' grade means you also made an earnest effort. Arriving late, leaving early, or not showing up earns an `F'. Arriving any time before 1:25 pm is considered on-time for lab.

Homework submitted late without permission will not be graded.

Projects are collaborative and all group members will receive the same grade in normal circumstances. Projects submitted late without permission will be penalized one grade per 24 hours (e.g., from A -> B. I recommend submitting projects on Thursday night, but am giving you until Friday so you don't have to pull an all-nighter if something goes wrong.)

Project 6 must be presented and submitted on 11/24 and will not be graded if submitted late.

Projects 0-530%
Exam (10/1)20%
Project 6 (11/26)20%

Content Warning: Computer graphics draws on mathematics, physics, and art as well as computer science. In this course, you will work with potentially hazardous materials and equipment in lab exercises, as you would in a physics lab. You will also view films and images that may contain adult themes, as you would in an art course. These materials are intended to increase your understanding and enjoyment of computer graphics. Your careful and appropriately academic conduct are required in both cases. In the event that you find a way to become injured or offended by pure mathematics I'll add an extra warning next semester.

News & Announcements

9/17/08 - Rendering notes updated Added an overview of the photon mapping algorithm and made a correction: the sampling domain in forward trace is based on |wo dot n|, not wo (this is a technical point for the derivation; it does not affect your implementation because the direction vector is implicit).

9/4/08 - Lab machines When working on projects, use one of the 10 computers with the horizontal CD drives. Those have GeForce 8800 GT cards donated to Williams by NVIDIA. Those machines will run your programs much faster than the others (and many projects won't run at all on the other computers.) We have additional cards waiting to be installed in the other machines and hope to upgrade them for you as well. There are some driver incompatibilities with the vertical-CD computers that we still need to work out.

9/4/08 - Textbooks arrive this weekend Water Street Books says that they won't have the textbook in stock until late Friday.

9/1/08 - Please Read Announcements Students are responsible for all announcements that are posted here, made in class, or e-mailed to the class. For important changes I will use all three methods. Announcements superceed the printed syllabus.

Projects 0-5

[Click here for the Project Schedule]

Most weeks you will work on a project that is due at 6pm on Friday. On Mountain day, the project will be due that Saturday at 6pm (technically, the Mountain day ends at 4pm, which is before the deadline, but I'd like you to be able to take the entire day as a holiday.)

Group Work
The projects in this course are challenging. Working in a small team on them has many benefits. It teaches you how to design and develop software with others, gives you a support network for debugging, and divides the workload.

I will assign you to a group of 2 or 3 students for projects 0-5. All members of the group will receive the same grade for that project. You will probably not work with the same students on more than one project. If you would like to work alone on a project, let me know by Wednesday night before the assignment goes out. If you have a private reason to not work with a specific student, let me know at the beginning of the semester and I will arrange the groups accordingly. I intend group work to enhance your experience. If it is detracting, let me know so that we can fix the situation.

Weekly Schedule
The projects involve significant mathematics, design, and programming. In most courses, the major challenge for most students is not the work but time management. To help with that I've structured the projects as follows.

Projects are designed for you to start on the weekend. You should tackle the major math and programming structure at the beginning. Homework is mostly math related to the project. It is due Monday to make sure that you have thought through the problems and have an opportunity to ask questions in lecture.

By Wednesday, you should be well into the implementation of your project. I'm setting aside the last hour of lab session for you to ask me programming questions and to debug your code together. In other words, you want to be far enough into the project that if anything goes wrong it happens Wednesday afternoon when I can help you, not late Thursday night when you're alone in lab.

A portion of your project grade is based on not what you did but how well you present it. Thursday and Friday are for polishing your results. The difference between a good graphics project and a great one is presentation. Showcase your hard work by rendering complex scenes or animating your results. This requires no extra programming, but is an important part of learning to present your work to others.

Programming is on your own time and not during scheduled lab sessions. You may use any computer that you wish. However, only the FreeBSD machines in the Unix lab will be officially supported. The TA will provide scheduled project lab coverage hours to help primarily with C++ syntax and compiler errors.

I modified the assignments for this year based on feedback from previous students, and based on your feedback I will adjust the project assignments and lecture schedule during the semester. The deadlines will remain fixed so that you can plan your semester early.

All of the projects use the G3D library as unified, well-tested suport code base. Except where explicitly prohibited by the assignment, you can use any routine in the G3D library and look at any of its source code. You do not have to cite the library when used in your solutions.

For a project, you may also use any source code that you or any other student in the course has written for a previous project in the course. Some of the projects are cumulative, and this policy allows you to pick up from someone else's work if your solution had too many bugs to continue. When you use someone else's work you must first get their permission. When you use either your work or someone else's from a previous assignment, you must clearly cite that work at the location where it is used and in your index.html file.

Project 6

Project 6 is the highlight of the course. It is a four-week project where you will choose your own group and topic. To keep you on track, there are multiple intermediate deadlines, including a presentation of your proposal, a code review, and two status reports per week in the form of images. The project cumulates in a presentation of your work to the class on 11/24.

For project 6 you may use libraries and routines from external sources (e.g., code posted online by graduate students). As in other cases, these must be cited in your work.


The class schedule on Wednesdays is:

12:00-12:50 pm Lecture in TCL 206 50 min
12:50-1:05 pm Break 15 min
1:05-1:25 pm Film & Cleanup 20 min
1:25-3:00 pm Lab exercise 90 min
3:00-3:50 pm Project work 50 min

Each week, I'll screen a short film after the break. These are important computer graphics shorts that use the techniques we're studying in class. They motivate our study of computer graphics. I recommend that you pack a lunch and eat during the screening. You can try and run out to buy lunch during the break, but might miss the beginning of the film.

Lab exercises are experiments using lenses, cameras, lasers, and other optical elements to study illumination phenomena in the real world. These will build your intuition and establish an experimentalist approach that you should bring to your final project. Note that lab exercises graded only on attendance and participation. There's nothing to hand in.

The end of each lab period is reserved for programming time. This is a good opportunity to work on your weekly project and to get help from me. You must remain in lab until 3:50 pm unless we have made other arrangements.

We won't have a regular lab session every single week. Some exceptions will be: the exam, a field trip to the museum to see motivating artwork, a feature-length film, and project presentations.

Honor Code

[Williams Honor Code] [Williams Computing Policies] [CS Honor Code and Computer Policy]

I have never encountered an honor code violation in this course and expect you will keep that record clean. To avoid any confusion, the guidelines for collaboration in this course are as follows. Ask me if you are unsure of the correct conduct in a specific case. In the event that you accidentally violate the honor code or observe someone else violating the honor code, discuss it immediately with me and the department chair to avoid misunderstanding.

Homework must be your own work and may not be worked on collaboratively.

Projects 0-5 must contain only: code written solely by your group, code written by yourself or other CS371 students this semester for previous assignments, and code from the G3D library. Code from previous assignments must be clearly credited both where it is used and in your index.html file. It may be used only with permission of the students involved.

You are strongly encouraged to discuss design, debugging, and mathematics related to projects (except where they appear on homework) with other students. Note that using previously submitted work and discussing projects is a more liberal policy than the default CS department policy for programming projects. Coursework in this class reflects your maturity and is modeled on professional research and development: we tackle hard problems, and do so together.

Project 6 may contain code from any source so long as it is used with permission and is clearly credited where used and in your project report.

Exam work is of course to be performed independently and without the use of restricted aids.

Recall that in accordance with the CS department policies, looking at any other computer user's files without permission is unacceptable, regardless of whether those files are protected on the file system.

Just for Fun

Fake Model Photography
Negative index of refraction
2008 Best of Visualizations