Announcements
-
Please set your Partner preferences for the Final Project and to get a repo.
-
The schedule for the Final project is out. You will work on this until the end of the semester. Please think about ideas and partners this week and start getting an outline of your code in place.
-
Friday office hours have moved to 3pm-4pm to accommodate faculty meeting schedules. On days without faculty meetings, I may be available earlier on Friday too. Check in on Slack.
Course Info
All times on this page are US EST (UTC-5 From Nov 1)
Instructor: Prof. Andrew Danner
Class: MWF 10:40am-11:30am, hosted on Zoom
Office hours: Check in on the #office-hours
channel in Slack to start a meeting.
-
Wednesday: 1:30pm-2:30pm
-
Wednesday Evening: 9:00pm-10:00pm. Priority is given to students in Pacific and East Asian time zones.
-
Friday: 3:00-4:00pm
A |
Mon. 1:15-2:45pm |
start on Zoom, move to Slack |
B |
Mon. 3:00-4:30pm |
start on Zoom, move to Slack |
Piazza: CS40 Q&A forum
Resources
There is no required textbook for this course.
Refer to the Remote Tools page for a summary of general remote work tools
Tutorials:
References:
Quick Checks:
Other References: Most of these use C/C++ as the language, but the general API is the same. Additionally, the OpenGL Shading Language (GLSL) is very similar for web versions (#version 300 es
) and desktop versions (#version 410
). They may be helpful if you are interested in exploring more of OpenGL.
-
OpenGL 4 Shading Language Cookbook (2e) (online at Swarthmore)
-
CUDA by Example
-
OpenGL Programming Guide (9e)
Course Goals
By the end of the course, you will have developed the following knowledge and skills:
-
You will learn how to write programmable shaders to manipulate vector geometry and render 3D scenes into a 2D image buffer.
-
You will learn alternative pixel based rendering methods such as ray tracing that bypass the vector geometry processing pipeline.
-
You will learn how graphics hardware leverages the Single Instruction Multiple Data (SIMD) architecture to accelerate the processing of millions of vectors in parallel. Additionally, you will better understand cases in which the SIMD architecture is/is not beneficial.
-
Through CUDA, you will learn how GPU hardware can be used to solve problems related to and distinct from computer graphics.
-
You will improve your software engineering skills by learning more advanced coding features, using multiple third party packages, and practicing visual debugging techniques.
-
You will learn to apply multiple course concepts to a final project of your own design.
Student Responsibilities
CS40 requires you to understand several linear algebra and geometric concepts and apply them to an advanced codebase in a highly specialized parallel computing environment. WebGL, Three.js, and CUDA are large software APIs and we will not be exploring them in great depth in a twelve week course. To succeed in this course, you should consistently do the following:
-
Attend class and lab sessions. The primary introduction to course material is through class instruction. Attending class is essential for understanding the subject. Lab sessions provide additional time to get hands on practice with the course material. Lab attendance is mandatory.
-
Participate actively in the learning process. The best way to learn this material is through constant effort. Run the demos and make small changes in a sandboxed environment before make larger changes or implementing new features in lab.
-
Start the lab assignments early. CS40 is coding course that relies on a number of specialty third party libraries. It is extremely difficult to understand, write, and test solutions at the last minute. It may be impossible to work on some labs remotely over ssh. I understand that it is not always possible to put serious time into an assignment early. However, even 30-60 minutes will be helpful, to ensure that you understand what the problems ask of you and to help you start thinking about where sticking points will be early.
-
Consult the documentation. In class examples or starting points for lab assignments will often have sample uses, but Three.js and WebGL functions often have numerous options or flags that may be helpful. Consulting the documentation for these libraries should be part of your course learning.
-
Seek help early and often. Because course material builds on previous material, it is essential to your success in this class that you keep up with the course material. If you feel you are falling behind or having trouble grasping a concept, please come to office hours. Ask questions, and review other questions on Piazza. You should also feel free to email me to set up an appointment if you cannot attend normal office hours.
Course Description
Welcome to CS40: Computer Graphics! This course focuses on the creation and manipulation of 3D geometric models and the rendering of these models on a two dimensional screen. We will examine modeling from both a pixel-based view and a more geometric vector-based approach. Core topics include geometric primitives, 2D and 3D matrix transformations, projective geometry, and object modelling. We’ll examine the traditional rendering pipeline and will explore advanced techniques for scene manipulation using programmable shaders. Intermediate topics include texture mapping, lighting, and shadows. We will be using the modern OpenGL programming approach which uses programmable vertex and fragment shaders throughout the course. Advanced topics may include GPGPU computing using CUDA, particle systems, noise, and additional programmable shaders.
Schedule
WEEK | DAY | ANNOUNCEMENTS | TOPIC & READING | NOTES/LABS |
1 | Sep 07 | Introduction | ||
Sep 09 | ||||
Sep 11 | ||||
2 | Sep 14 | Drop/add ends | Rendering pipeline | |
Sep 16 | ||||
Sep 18 | ||||
3 | Sep 21 | Vector/Matrix Prelims | ||
Sep 23 | ||||
Sep 25 | ||||
4 | Sep 28 | Projection Transforms | ||
Sep 30 | ||||
Oct 02 | Quiz 1 | |||
5 | Oct 05 | Perspective Matrix | ||
Oct 07 | ||||
Oct 09 | ||||
6 | Oct 12 | Lighting, Normals | notes | |
Oct 14 | ||||
Oct 16 | ||||
7 | Oct 19 | Raymarching | ||
Oct 21 | ||||
Oct 23 | ||||
8 | Oct 26 | Perlin Noise | ||
Oct 28 | ||||
Oct 30 | ||||
9 | Nov 02 | Particle Systems | ||
Nov 04 | ||||
Nov 06 | CR/NC/W Deadline | |||
10 | Nov 09 | Normal Mapping | ||
Nov 11 | ||||
Nov 13 | ||||
11 | Nov 16 | Computational Geometry | ||
Nov 18 | ||||
Nov 20 | ||||
Nov 23 | Thanksgiving | |||
Nov 25 | ||||
Nov 27 | ||||
12 | Nov 30 | Advanced Shading Methods | ||
Dec 02 | ||||
Dec 04 | ||||
Dec 08 | Final Exams Start | |||
Dec 15 | Final Exams End |