2021 March 10,

CS 311: Computer Graphics

Carleton College, Winter 2021, Joshua R. Davis, , Anderson 238, x4095

Introduction

This course is an introduction to computer graphics. Our goal is to understand the theory and methodology underlying computer-generated films, video games, scientific visualizations, etc. The course proceeds in three parts:

  1. We begin with a minimal hardware interface that lets us set the colors of individual pixels in a window. Atop this primitive foundation we implement 2D triangle rasterization, interpolation, and vertex and fragment shaders. Then we transition to 3D and add projections, depth buffering, clipping, etc. In other words, we implement our own OpenGL-like 3D graphics engine.
  2. We re-write our triangle-rasterizing graphics engine to use hardware acceleration. We focus on shader-based interfaces (OpenGL 2, 3, 4), although we also glimpse fixed-function interfaces (OpenGL 1) and lower-level interfaces (Vulkan). We add computationally expensive features such as shadow mapping.
  3. We implement ray tracing based on the same minimal hardware interface as in the first part of the course. Features include shadows, mirror reflections, and refraction.

In short, this course focuses on 3D graphics, but we do some 2D graphics along the way. There are many valuable 2D topics that we omit. We do almost no image processing. We also spend as little time as possible on artwork. We are not making a polished movie, game, or visualization. Rather, we are making the technological foundation, upon which someone could build a movie, game, or visualization.

The prerequisite for this course is CS 201: Data Structures. We might use some of its specific content, such as graphs and stacks. More importantly, students must have maturity in thinking algorithmically and learning on their own. Students are expected to learn C and basic linear algebra such as matrix multiplication. I provide tutorials to teach the essentials of these subjects, but I do not spend much class time on them. Talk to me if you are concerned about your background. I am happy to help you learn the necessary skills. :)

Logistics

Because the COVID-19 pandemic makes things unpredictable, the details of the course are subject to revision. We all need to be empathetic and flexible. Anyway, here is my tentative plan.

Our class meets in Zoom during period 1A (MonWed 8:30-9:40, Fri 8:30-9:30). This synchronous lecture/discussion is recorded, so that students in distant time zones (for whom Carleton's morning is the middle of the night) can watch it asynchronously. All other students are expected to participate synchronously.

Office hours are held in Zoom; see the Moodle page for the Zoom link. The official times are Sun 3:30-4:15 PM, Tue 7:00-7:45 PM, Thu 1:30-2:10 PM. Additionally, my Math 240 office hours are Sun 4:15-5:00 PM, Tue 7:45-8:30 PM, Thu 2:10-2:50 PM. I am happy to talk to you in there, unless Math 240 students are waiting. No appointment is needed; just drop in. If you cannot attend office hours, then e-mail me to ask for an appointment, listing several times at which we could meet. I teach 1A and 3A, so don't bother trying those.

Materials

Here are some resources produced by me specifically for this course. (There is no official textbook.)

Here are some external resources. In the second part of the course, we focus on OpenGL 3.2. References for later/earlier versions are pretty useful for C functions but less useful for OpenGL Shading Language (GLSL) syntax, which changes swiftly.

Responsibilities

The following elements contribute to your numerical grade. At least one exam is written/typed with a large time allotment. At least one exam is oral, meaning a 10-minute, one-on-one discussion about the material. Most (but not all) of the exam questions are checks that you understand the homework and lecture/discussions.

Numerical grades are converted to letter grades only at the end of the term. There are no predetermined percentages (90%, 80%, 70%, etc.) required for specific grades (A, B, C, etc.), because I cannot write problems that are so precisely and reliably tuned. Instead, I assign letter grades by comparing students' scores to the course goals. Roughly speaking, a student who meets most of the goals earns a B. A student who meets almost all goals — and sometimes exceeds them — earns an A. A student who demonstrates effort but meets only a few of the goals earns a C. Students, for whom I have insufficient evidence of learning and effort, might earn grades below C.

An advantage of this system is that students are not in competition with each other. Also, students don't suffer when I accidentally write a difficult exam. The disadvantage is that you cannot compute your own grade. Send me e-mail, if you want me to estimate your current grade for you.

The College's accreditation says that a 6-credit course is 150 hours of work. That's about 15 hours per week or 5 hours per class meeting. Those 5 hours break down into about 1 hour for class itself and 4 hours for homework, reading, studying, etc. If you find yourself spending much more time than this, then talk to me.

Working with Others

For some assignments the students are expected (but not required) to work in pairs. Your pair hands in a single copy of the assignment with both names on it. You are encouraged to talk with other pairs — to bounce ideas off them — but the work that you submit must be the work of your own pair. The two members of a pair must contribute roughly equally.

Other assignments may be individual. Even on these assignments, you are encouraged to talk with other students. In the end, however, you write or type your own solutions, in your own words.

You may not copy someone else's work or allow them to copy yours — in person, over the Internet, etc. Presenting someone else's work as your own is an act of academic dishonesty. The College requires me to report you if I suspect that you have not upheld its Academic Integrity standards.

Special Accommodations

If some medical condition affects your participation in class or your taking of exams, let me know in the first week of class. You may also need to make official arrangements with Disability Services.

In most courses that I teach, homework is assigned daily and collected weekly, and I have a policy of one free late pass per term. In this course, however, we are building fairly large, ongoing projects, and each day's code builds on the code of the previous day. You simply must keep up with the homework.

So here is the tentative late policy for this course: If you cannot complete a homework assignment on time, then talk to me within one calendar day of the due date, so that we can figure out how to get you back on track. I reserve the right to change this policy.