2022 November 13,

CS 311: Computer Graphics

Carleton College, Fall 2022, Joshua R. Davis, , CMC 324, x4095

Introduction

This course is an introduction to computer graphics. We focus on the two main algorithms for three-dimensional graphics: triangle rasterization and ray tracing. These algorithms produce almost all of the 3D imagery seen in computer-generated films, video games, scientific visualizations, etc. The course proceeds in three stages:

  1. We begin with a minimal programming interface that lets us make a window and set the colors of its pixels. Atop this primitive foundation we implement 2D triangle rasterization, interpolation, fragment and vertex shaders, and meshes. Then we transition to 3D and add depth buffering, projections, clipping, etc. In other words, we implement our own 3D graphics engine like (the core of) OpenGL, Vulkan, Direct3D, or Metal.
  2. We re-write our triangle-rasterizing graphics engine to use the graphics processing unit (GPU). To understand some key concepts, we first learn a little OpenGL history. Then we use Vulkan to do the work. We add features such as scene graphs and Phong lighting.
  3. Returning to the same minimal programming interface as in the first part of the course, we implement as much ray tracing as time allows. Features include shadows, mirror reflections, and either transmission or hierarchical bounding volumes.

Graphics is a big field, so there is much that we don't cover: other 3D algorithms, most 2D algorithms, image processing, etc. Also, we spend as little time as possible on artwork. We are not making a polished film or game. Rather, we are making a technological foundation, upon which someone could build a film or game.

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. I provide tutorials about the C programming language and basic linear algebra, but I don't 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. :)

Responsibilities

You should expect to work hard and learn a lot. 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 less time and struggling, then talk to me. If you find yourself spending much more time, then talk to me.

For better or worse, we are required to measure your learning using grades. The following elements contribute to your numerical grade.

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 assignments and exams that are so precisely tuned. Instead, I assign letter grades by comparing students' scores to the course goals. For example:

In general, 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.

In class, photographs and recordings are not permitted without my prior approval. Phones are not permitted, except for the purpose of approved photographs and recordings.

Resources: Help Yourself

If the preceding section is bad news, then these next few sections are good news. You are supported with multiple ways to learn the material. :)

Here are the three projects that make up the bulk of the course. The instructions are pretty detailed.

Here are exams from this term and two earlier terms, with solutions and quartiles (75th, 50th, and 25th percentiles). Keep in mind that the topics vary slightly from term to term.

Here are some other resources produced by me specifically for this course.

Here are some external resources. There is no official textbook.

Resources: Your Partner

For the first week of the course, you are required to submit individual project work. You are encouraged to work in the same room with other students and bounce ideas off them, but the work that you submit for grading must be your own.

After the first week of the course, I assign partners. (You have the opportunity to express some preferences. You may also opt out entirely and work alone.) You keep your partner for the remainder of the first project, unless the partnership turns out to be dysfunctional. You and your partner develop a single code base, with both of your names on it, and submit a single copy for grading. Again you are encouraged to bounce ideas off other groups, but the work that you submit must be done by your group.

When we start the second project, I assign new partners based on another poll of your preferences. You keep your partner for the whole project.

When we start the third project, I again assign new partners for the whole project.

Resources: Other

I hold office hours several times per week. See below for the schedule. No appointment is needed; just drop in! If you cannot attend office hours, then consult my weekly schedule and e-mail me, listing several times at which we could meet.

Our course staff member, PJ (), helps you in two ways. First, he provides preliminary grading of your projects before I grade them. Second, he too holds some office hours in the lab.

Josh When?Where?For Whom?PJ When?Where?For Whom?
Mon 3:10-4:20 (6A)Olin 308CS 311, 254Sun 2:00-3:00Olin 310?just CS 311
Tue 11:00-12:00Olin 308CS 311, 254Mon 7:00-9:00 PMOlin 310all CS
Wed 11:10-12:20 (3A)Olin 308CS 311, 254Wed 7:00-9:00 PMOlin 310all CS
Thu 9:30-10:30Olin 308CS 311, 254
Fri 1:10-2:10 (4A)CMC 324CS 311, 254

For help with linear algebra and other math, you can also visit the Math Skills Center on the second floor of CMC. It is reasonable to consult books or the Internet for help with math, C, or Vulkan details. For help with graphics material, I prefer that you don't consult the general Internet; please use me, PJ, your classmates, or the resources listed on this web site instead.

Our course should be welcoming to all students, regardless of their identities, backgrounds, and experiences. We should all be resources to each other rather than hindrances. Please let me know if anyone — a classmate, a lab assistant, or I — do anything to make you feel otherwise.

If a health condition or other personal matter affects your participation in class, homework, exams, etc., then please let me know as soon as possible. Depending on the situation, we might want to confer with Accessibility Resources, Assistive Technology, Student Health and Counseling, or Sexual Misconduct Prevention and Response. When you ask me to help, I do my best to help. :)