Course Information


Course CS371, Fall 2012
Instructor Prof. Morgan McGuire
Lecture TCL 206 MWF 12:00 pm - 12:50 pm
Lab TCL 216 Thu   1:00 pm -   4:00 pm

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.

The cumulative laboratory exercises bring students through the entire software research and development pipeline: domain-expert feature set, formal specification, mathematical and computational solutions, team software implementation, testing, documentation, and presentation.

Fulfills the Quantitative Reasoning and CS Project Course requirements.

Prerequisites CS 136 and CS 237
Textbooks Shirley et al., Fundamentals of Computer Graphics 3rd Edition, A K Peters 2009 ($80.63)
McGuire, The Graphics Codex 1.5, Casual Effects 2012 ($6.99)

You can read the Graphics Codex on iPhone, iPad, or iPod Touch. iPad 2 or newer give the best experience. iPads area available for semester loans from OIT for registered CS371 students who do not own a recent iOS device.


The course is driven by a set of cumulative projects that combine mathematial, software design, and programming work. For the "midterm" and "final" projects, you will choose your own topics. Projects are evaluated based on a combination of factors including presentation (oral or in documentation), mathematical correctness, software design, and code clarity. Plan your time carefully because there are no extensions to deadlines.

The projects have intentionally varying levels of difficulty. Some are solo projects and some are team projects with assigned teams. Tell me your preferences for whom you would like to to work with or not work with privately and I will follow them in assigning teams.

All of the projects use the G3D library as unified, well-tested suport code base that sits on top of OpenGL. 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.

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 and how the honor code applies to the assignments in this course are listed below. 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.

Projects 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. For the final and midterm projects you may use external libraries with prior approval from me by e-mail. 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.

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