Course outline

CS 248 - Introduction to Computer Graphics
Spring Quarter, 1995
Marc Levoy
Handout #1 (updated periodically)

Table of contents:



Marc Levoy
207 Center for Integrated Systems (CIS)
Office hours: Tue/Thu 11:00 - 12:15 and by appointment

Teaching assistants

Joint email address:


Sarah Beizer
069 Center for Integrated Systems (CIS)
(near Marc Levoy's office)

Course calendar

There will be nineteen lectures. The topics to be covered, with approximate dates, are:

April 4 - Introduction
April 6 - Hardcopy and display technologies
April 11 - Human color vision, physical colorspaces
April 13 - Intuitive colorspaces, frame buffers, paint programs
April 18 - Colormapping, dithering, image processing
April 20 - Human spatiotemporal acuity, grayscales, gamma correction
April 25 - Scan conversion of lines and polygons
April 27 - Scan conversion (continued), 2D clipping
May 2 - Antialiasing techniques
May 4 - Antialiasing (continued), image compositing
May 9 - 2D transformations, modeling hierarchies
May 11 - 3D transformations, planar projections
May 16 - Perspective viewing, 3D clipping
May 18 - Visible-surface determination
May 23 - Visible-surface determination (continued), Z-buffer
May 25 - Visible-surface determination (continued), ray tracing
May 30 - Local illumination models
June 1 - Polygon mesh shading
June 6 - Texture synthesis, transformation, resampling

Required textbook

The textbook for this course is:

Foley, van Dam, Feiner, and Hughes,
Computer Graphics: Principles and Practice,
second edition, Addison-Wesley.
Copies of this book are available in the textbook and general computer science sections of the campus bookstore.

Additional readings

We will also read a number of papers from current journals and conference proceedings. I will hand out copies of these papers in class as they become relevant.

Reserve readings

I am placing the following materials on 2-hour reserve at the Stanford Math/Computer Science Library.

  1. Foley, van Dam, Feiner, and Hughes, Computer Graphics: Principles and Practice, second edition, Addison-Wesley.
  2. Andrew Glassner, Graphics Gems,Academic Press.
  3. James Arvo, Graphics Gems II, Academic Press.
  4. David Kirk, Graphics Gems III, Academic Press.
  5. Paul Heckbert, Graphics Gems IV, Academic Press.

Numbers 2 through 5 are compendiums of graphics tricks, hacks, and useful algorithms. These three books are so popular that if I don't place them on reserve, you'll have to buy them to read them - not a bad idea in any case.

The graphics course sequence

The textbook is big - over 1000 pages. We won't cover all of it in one course. To give you an idea what we will cover, here is a list of the four graphics courses currently offered at Stanford. Of these four, three are lecture courses based on material from the textbook: 248, 348A, and 348B. For these three courses, the list also shows the chapters they cover. Don't interpret this list too literally; the ordering of chapters in the textbook is not necessarily followed in the courses. In addition, the 300-level courses cover their topics in greater detail than the chapters listed, and they use other books.

Some background in graphics is expected of students taking the 300-level courses, usually fulfilled by taking 248. Otherwise, there is no required ordering among the courses. For more information of these courses, look at our courses home page.

Course prerequisites

CS 248 assumes no prior knowledge of computer graphics. However, most student taking 248 have had some exposure to graphical user interfaces and interaction techniques, usually through CS 108. We assume some programming experience in C (or C++) on a UNIX workstation, and we assume a basic knowledge of calculus and linear algebra (one college-level course of each). An exposure to digital signal processing or Fourier analysis is useful, but it is not required.

Course requirements

In addition to regularly scheduled readings, the workload for this course consists of four programming assignments and an evening midterm examination. The evening examination will be on Thursday, May 18 at 7:00pm in Skilling Auditorium. SITN students must come to campus for this exam. There will be no final exam.

The first programming assignment is a paint program - a fun warmup exercise designed to get you familiar with the programming environment. The next three assignments implement successive stages of a typical display pipeline. Each assignment builds on the previous one. By the end of the quarter, you'll be generating some very cool images.

  1. Paint program - 24-bit painting program that offers a weighted mask-driven tinting brush.
  2. Scan converter - Polygon scan converter for interactively defined triangles. Supersampling will be used to provide antialiasing.
  3. Z-buffer renderer - Renderer for 3D scenes, using your scan converter from project #2. A supersampled Z-buffer will be used to provide antialiased hidden-surface removal.
  4. Renderer with shading - Improved renderer that includes Phong illumination, interpolated shading of triangle meshes, and display of textures generated using your painting program.

For each assignment, you will demo your program to myself or a teaching assistant on a Monday. A commented on-line copy of your source code and a brief (1-2 pages) hardcopy description of the functionality implemented is due by 5:00pm the following day. We will describe in a later handout how the on-line submissions will be handled. Bins for turning in and retrieving the hardcopy submissions are located near Sarah's office. Nearby is a filing cabinet that will contain all class handouts.

Grading policies

Evaluation criteria: The four programming assignments will each count as 20% of your grade. The midterm exam will account for the remaining 20%. Grading criteria on the assignments will vary; typical criteria are correctness (40%-70%), efficiency (15%-20%), programming style (10%-20%), and the elegance of your user interface (5%-20%).

Collaboration: You are encouraged to work in teams of two on the assignments. Teams may discuss the assignments with other teams, but each team is expected to implement the assignments independently. In particular, code must not be shared between teams. The exam must be an individual effort.

Late assignments: Since each assignment builds on the previous one, it is important that assignments be completed on time. To allow for unforeseeable circumstances, you will be allowed one weekday of grace during the quarter. Beyond this, late demos will be penalized by 10% per weekday that they are late. Project #4 must not be late. Writeups are due the day following your demo.

Hardware and software

Hardware: For the duration of the quarter, you will have access to the Stanford Undergraduate Graphics Laboratory. The lab, located in the basement of Sweet Hall, contains 15 Silicon Graphics Indigos (100Mhz R4000 processor, 60K polygons/sec, 24-bit frame buffer, and CD-quality digital stereo audio). Students in CS 248 have non-exclusive priority access to this laboratory, whose door is protected by a combination lock.

Software: Since class enrollment will probably exceed the capacity of the SGI laboratory, we are providing a support package that runs on most X-compatible workstations, including the Sweet Hall SGI workstations, 8-bit color Sparcstations, and 8-bit Dec Alphas. To use the package, you must program in C or C++. The package provides sliders, buttons, a drawing canvas, some help with mouse and cursor interaction, and a few utilities for loading and storing images. If you are working on a 24-bit workstation (such as our SGIs), the package allows you to display your 24-bit images directly. If you are working on an 8-bit workstation, the package automatically dithers and gamma corrects your image prior to display. We will also provide a simple 3D modeling package that runs only on the SGIs. You can use this modeler to generate input data for your display pipeline.

Using other platforms: Grading of programming assignments will consist of face-to-face demos, and all demos must be given in the Sweet Hall lab. If you prefer working on the RealityEngine in your dorm room, you should make certain that your program runs on the Sweet Hall SGIs prior to demo day. If you prefer working on the RealityEngine clone your video game company is developing, you may copy our support package and use it locally. All you need is X and Motif. If you use an incompatible language or platform, you should write a software package that mimics our user interface as closely as possible as this will greatly facilitate grading. Once again, to help us judge the performance of your program, your program must be executing on a Sweet Hall SGI workstation as well as displaying there during your demo.

Online services

Student accounts: The Sweet Hall SGI workstations share accounts and file servers with the Sweet Hall machine cluster. If you don't have an account on the cluster, here's how to get one. Telnet to and, at the login prompt, type open. This invokes the account opening program that takes you through a menu of questions. If you give it a valid student ID and you don't have an account already, it lets you open an account with an account-name of your choice. This account gives you access to the Sweet Hall Sparcstations (elaine1 - elaine50), the Sweet Hall SGIs (raptor1 - raptor15), and several other kinds of machines. It takes a day or so for the account to become active. To insure reliable interactive performance, raptor1 through raptor5 refuse remote logins. We will use these machines during our demo days.

Course directory: Once your account is active, log in to one of these workstations and browse through the directory /usr/class/cs248. This will be your course directory. All software and data relevant to the course will be placed here. In particular, this is where you will find Toli's support package for the programming assignments. See the README file for more information. (This directory currently contains material from last year's class; we'll clean it up shortly.)

World Wide Web: New for this year, all class handouts, programming assignments, weekly reading lists, and lecture notes (to the extent I have time to prepare them) will be available via the Web at URL This handout is the first entry in that web hierarchy. Hardcopy of these materials will be made available in class and will be shipped by courier to SITN students in the usual manner, but the latter may not always arrive before class time. In these cases, SITN students can find them on the Web, and early birds can spool them to a printer before class starts.

Newsgroup: A newsgroup has been set up for this course. It is called su.class.cs248. Feel free to post news to this group. It is intended for posting questions to your fellow students, flaming at the professor (I may, however, read the newsgroup on occasion!), looking for project partners, etc.

Emailing addresses: To send email to the instructor or a particular TA, use the email addresses listed earlier in this document. For questions directed to the TAs jointly, and for emailing student questionnaires back to us, and for other purposes that we will announce throughout the class, use

Class emailing list: For items of urgent and universal importance such as clarifications in the assignments or bugfixes related to the support package, your instructors will use an emailing list to contact you, so please make sure we know your email address, i.e. fill in the student questionnaire!

Rendering competition

In case the delight of learning does not sufficiently motivate you to exert yourselves heroically on the programming assignments, there will also be a rendering competition. At 4:00pm on Monday, June 12, a judging will be held to select the best rendering made using the renderer you have written in the course. You are welcome to use the SGI modeling package in building your scene geometry. While grades for the projects are based solely on "technical merit", the competition will be judged on both "technical merit" and "artistic impression". The jury, to be named later, will consist of computer graphics experts from both industry and academia. There will be several awards and one grand prize - an all-expenses-paid trip to Siggraph '95 in Los Angeles. Total value: about $500.
Tuesday, 25-Apr-1995 03:14:24 CDT