CS 248: Introduction to Computer Graphics

Pat Hanrahan



Virtual Places


This course provides a broad overview of the basic concepts of computer graphics. Both 2d raster graphics and 3d graphics will be covered. Topics from raster graphics include color theory, tone reproduction, quantization, dithering and halftoning, basic signal processing and sampling, aliasing and antialiasing algorithms, and scan conversion of lines and polygons. Topics from 3d graphics include projective geometry, representations of curves and surfaces, modeling and viewing transformations, hidden surface removal algorithms, reflection models and illumination algorithms. In addition the general features of graphics hardware and system architectures will be covered.


CS 248 assumes no prior knowledge of computer graphics. However, most students taking CS 248 have had some exposure to graphical user interfaces and interaction techniques, usually through CS 108. We assume solid programming skills in C (or C++) on a UNIX workstation and a knowledge of basic computer algorithms and data structures. We also assume a basic knowledge of calculus and linear algebra (one college-level course of each), and basic familiarity with 2D and 3D geometry. Exposure to digital signal processing or Fourier analysis is useful, but it is not required.


The textbook for this course is:

Foley, van Dam, Feiner, and Hughes,
Computer Graphics: Principles and Practice,
2nd edition in C, Addison-Wesley.
Neider, Davis, Woo,
The OpenGL Programming Guide
Copies of this book are available in the textbook and general computer science sections of the campus bookstore.

A course reader containing additional material not covered in the texts will also be made available. This consists of several papers and draft notes written by Prof. Hanrahan for several of the lectures. Slides of the lectures will also be made available via the CS 248 Home Page. All reading material will be available on reserve in the Math/CS Library.


In addition to regularly scheduled readings, the workload for this course consists of four programming assignments and two exams. The evening examinations will be on campus; SITN students must come to campus for these exams.

The tentative list of programming assignments are:

  1. Simple Game - This assignment involves writing a graphics intensive game. The goal of the assignment is to learn basic interactive graphics techniques.
  2. Interactive Environment Viewer - This assignment involves writing a program to project panoramic images onto the image plane as a function of head orientation. This is the basis of Apple's QuickTime VR system. The goal of this assignment is to implement a simple polygon scan convertor and texture mapping.
  3. Skeleton Animation System - This program involves creating a movable 3d skeletal stick of a human body and some simple tools to manipulate the skeleton and perform key frame animation. The goal of the assignment is to learn how modeling and viewing transformations can be used to compose and view 3D scenes.

Each assignment will require you to produce a working program, some test images and examples of the program in operation, a commented on-line copy of your source code, and a brief (1-2 pages) description of the system. Assignments are due by 5:00pm on the day indicated. All submissions will be done on-line; We will describe the process in a later handout.


Evaluation criteria: The four programming assignments will count as 60% of your grade (17.5%, 17.5%, and 25%, respectively). The midterm and final exams will each account for 20% of your grade. Grading criteria on the assignments will vary: typical criteria are correctness (as judged by the test cases, images produced, or running the program) (75%), and efficiency and programming style (25%). Several assignments will have the opportunity for extra credit.

Collaboration: Each assignment must be done individually. Working in groups is not allowed.

Late assignments: Since there are many topics covered in this course, it is important not to fall behind. Thus, all assignments should be completed on time. However, we realize that there are unforeseen circumstances that make it difficult to turn in all work on time. Therefore, you will be allowed four weekdays of grace during the quarter, an average of one day per assignment. Once your four days are used, late assignments will be penalized 10% per weekday. No assignments will be graded if they are more than 1 week late,

SGI Laboratory

Hardware: To do the assignments you will have access to the Stanford Graphics Laboratory. The lab, located in two rooms in the basement of Sweet Hall, contains 15 Silicon Graphics Indigos XZs (100Mhz R4000 processor, 60K polygons/sec, 24-bit frame buffer, and CD-quality digital stereo audio), and 19 Silicon Graphics Indigo2 XZs (150 Mhz R4400 with similar graphics capabilities).. Students in CS 248 have non-exclusive priority access to this laboratory, whose door is protected by a combination lock.

All students with leland accounts automatically have accounts on these machines. Home directories on these machines are shared with other Stanford Computing Clusters using AFS. If you do not have a leland account, follow these instructions.

Software: To help focus your attention on the key ideas in each assignment, we will provide support libraries and datasets for each assignment. These tools will be installed on the Stanford Graphics Laboratory machines in Sweet Hall.

Using other platforms: If you prefer working in your dorm room or workplace, and have access to a machine there, you are welcome to do the assignments on your own machines. . However, your code must still use OpenGL, and in the end it is your responsibility to insure that it is copied and tested on the SGI machines in Sweet Hall. To help those working remotely, we will make available source for the support libraries that are used for each assignment. You are free to copy that source and port it to your environment, if you wish. However, we make no guarantees concerning the portability of this software. Please, if you improve the portability of the support code, return the source to us so that we may incorporate your changes into the future versions of the software. Extraordinary improvements to the support libraries will also be rewarded with special credit.


Copyright © 1996 Pat Hanrahan