Computer Science 357

Graphics Programming

Fall, 2008


Bob Geitz, King 223A
Office Hours:
WF 2-4, TR 11-12, or by appointment
I am around most of the day when I am not in class.

Course Description:

This is a programming course in computer graphics. It has three serious prerequisites: a knowledge of C programming (all of the libraries we will use are in C/C++ and are not java-compatible), knowlege of algorithms and data structures comparable to CS280, and sufficient mathematical experience that you can deal with matrices and linear transformations. Math 232 is strongly recommended, but we will actually develop most of the math we need in class. We will focus in this course on fundamentals: how to develop tools and algorithms for image synthesis and (to a lesser extent) animation. Our goal is not to make pretty pictures -- these days people use high-level software for that, but rather to understand how that software works and to make some of it ourselves. By the end of this course you should be able to read some of the current research papers on graphics and to develop new tools on your own.


3D Computer Graphic by Alan Watt

OpenGL Primer (3rd edition) by Edward Angel
The Watt book is the most mathematical of the many introductions to graphics that are available today. It is more a reference book than a textbook. We won't follow it chapter by chapter, but it does contain almost everything we will do during the semester, and a lot more. This should be a great supplement to the lectures in the class.


In the 1980s and 1990s the graphics hardware market was dominated by one company: Silicon Graphics Inc. or SGI. The graphics language built into the SGI workstations was called GL. Starting in the early 1990s, when it was riding high, SGI created an open version of GL, called OpenGL, and set up an independent consortium to define and standardize it. SGI is dominant no more, but OpenGL is as close as we have to a standard, platform independent, graphics library. If you go on after this course to do graphics work in graduate school or in industry you may use OpenGL or you may use something else, but you should find your knowledge of OpenGL will help in any environment you find yourself doing graphics programming. All of the programming we will do in this class uses OpenGL. Ed Angel's Primer is a good, concise guide to getting started with it. Most of what you will need for this book is covered in either this book or in the GLUI documentation. If you want to go beyond what we are doing in class, the standard OpenGL references are the Red Book and the Blue Book. There are public online versions of the first editions of these -- see the class homepage for links to them.



We will have 5 significant programming projects this semester. Graphics programs tend to be long and somewhat mysterious, which means they take some time to debug. Fortunately, they are also fun. I will assume that you are starting the projects as soon as I make the assignments, and I will try to have the next assignment ready as soon as one is completed, so you should always have a program you can be working on. OpenGL is a very powerful tool set, and there is no end to the bells and whistles you can add to the assignments. I suggest that you talk to me before you start adding things beyond what I have asked for in the assignments.

In addition to the programs we will have a midterm and final. This course has a lot of concepts, not all of which lend themselves to programming projects (at least, not to projects that you could complete before you graduate...), so we will have two exams. The midterm is worth about 15% of your final grade, the final exam about 20% and the remaining 65% is evenly divided among the programming projects.

The Honor Code

The Honor Code has a straightforward application to this class. You may discuss the programming projects with anyone else and use any outside sources you want, but in the end you need to write all of your code yourself. The exams will be closed-book exams taken in class, and you obviously should not receive help from anyone during these exams.

Course Outline

This is a rough outline, which I probably won't stick to. It should give you at least an idea of what we will be doing in the course.

1. Introduction -- 1 week

Project 1: 2D Drawing and Animation

2. Transformations -- 3 weeks

Project 2: Creating a 3D System

3. Hidden Line and Hidden Surface algorithms -- 1 week

4. Hierarchical modeling and animation -- 1 week

Project 3: 3D Modeling

---------------- Fall Break ------------------------

5. Color Theory -- 1 week

6. Lighting and Shading -- 2 weeks

Project 4: Ray Tracing

7. Geometric Modeling -- 2 weeks

8. Realistic Image Synthesis -- 2 weeks

Project 5: Modeling with splines