CS 248 - Introduction to Computer Graphics
Autumn Quarter, 2002
Marc Levoy
Handout #1
Marc Levoy
Gates Computer Science Building, Room 366
levoy@cs.stanford.edu
http://graphics.stanford.edu/~levoy
(650) 725-4089
Office hours: Tue/Thu 11:00am - 12:15pm and by appointment
Vaibhav Vaish
Gates Computer Science Building, Room 360
vaibhav@stanford.edu
http://graphics.stanford.edu/~vaibhav
(650) 723-3154
Office hours: Monday, 11:20-1:20pm, Wed 4:00 - 6:00pm, Gates Hall 360
Billy Chen
Gates Computer Science Building, Room 360
billyc@graphics.stanford.edu
http://graphics.stanford.edu/~billyc
(650) 723-3154
Office hours: Mon/Wed 10:15am - 12:15pm, Gates Hall 360
Georg Petschnigg
georgp@stanford.edu
http://www.stanford.edu/~georgp
Office hours: Thu 4:15pm - 6:15pm and Fri 10:00am - 12:00pm, Sweet Hall graphics lab
Zak Middleton
zacharym@stanford.edu
Office hours: Tue 4:15pm - 6:15pm and Wed 1:15pm - 3:15pm, Sweet Hall graphics lab
Joint email address: cs248-tas@graphics.stanford.edu
Help sessions: There will be help sessions on the Friday of each week in which a project is assigned, i.e. on Oct. 4, Oct. 18, and Nov. 8, and for project #3 there will be a second help session on Wednesday, Nov. 6. There will also be review sessions on the Friday of each week before an exam, i.e. on Nov. 1 and Dec. 6. All help and review sessions will be 2:15pm - 3:05pm in Gates B03 and televised on SITN (channel E4). The dates of these sessions are summarized in the course schedule (HO #2). Other than these dates, there will be no classes or discussions meetings on Fridays. In addition to these help and review sessions, on the weekends immediately preceeding the due dates of each programming project, the instructor and teaching assistants will hold special office hours in the Sweet Hall graphics labs. Hours to be announced (TBA).
Ada Glucksman
Gates Computer Science Building, Room 368
[email protected]
(650) 725-3724
There will be twenty lectures. The topics to be covered, with approximate dates, are given in the class schedule. These lectures will be broadcast on SITN (channel E2) and encoded for Stanford Online. In addition, I will place my lecture notes online, linked off of the class schedule, as soon as possible after each lecture.
Despite all this technology, it would give me great pleasure to see the alert, smiling faces of my on-campus students in the classroom. Although the course is large, you'll find the lectures to be surprisingly interactive. I teach because I enjoy these interactions. You'll also learn more if you attend class, and I'll get a better sense of how well the material is getting across. If you cannot attend a particular class, the lectures will be encoded and placed online, as mentioned above. However, I appeal to you not to abuse this system. If the only time I see you in person is during grading sessions, we have both lost something precious.
Required: Foley, van Dam, Feiner, and Hughes,
Computer Graphics: Principles and Practice,
second edition in C, Addison-Wesley.
Click here for errata
Optional: Woo, Neider, and Davis,
OpenGL Programming Guide,
third edition, Addison-Wesley.
Click here for errata
Optional: Möller and Haines,
Real-Time Rendering,
second edition, A K Peters, 2002.
Copies of all three texts are available in the textbook and general computer science sections of the campus bookstore. Readings from Foley, van Dam, Feiner, and Hughes will be assigned throughout the course. The OpenGL book will be used only in the last half of the course. We first want you to learn how OpenGL's graphics primitives work. Afterwards, you can start using it as a power tool. The Real-Time Rendering book covers programming techniques you'll find useful when writing your video game, so it too will be used mainly toward the end of the course.
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. All required reading (including from the textbooks) will be assigned verbally in class as well as being listed in the class schedule.
I am placing the following materials on 2-hour reserve at the Stanford Math/Computer Science Library.
Numbers 6 through 10 are compendiums of graphics tricks, hacks, and useful algorithms. These five 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.
Also on reserve (permanently) are the proceedings of ACM Siggraph, the premiere forum for publication of research results in the field of computer graphics. I will frequently reference Siggraph papers during my lectures. I encourage you to browse these books; you will find them inspirational in times of suffering and a wellspring of good ideas for your projects.
CS 248 assumes no prior knowledge of computer graphics. However, most students taking 248 have had some exposure to graphical user interfaces and interaction techniques, usually through CS 107 or 108. Formally, we require CS 107 and Math 103. However, we do not enforce these prerequisites. More specifically, we assume some programming experience in C (or C++) on a UNIX workstation, and we assume a basic knowledge of calculus and linear algebra. An exposure to digital signal processing or Fourier analysis is useful, but it is not required.
In addition to regularly scheduled readings, the workload for this course consists of three programming projects, an evening midterm examination, and a final examination. The midterm will be on Monday, Nov. 4 in the evening. The final will be on Thursday, Dec. 12, at 7:00 - 10:00pm. SITN students must come to campus for both exams. Makeup exams will be offered only in extreme circumstances, and must be approved in advance. A makeup midterm exam will be offered to students enrolled in CS 221, if their midterm conflicts with ours. A makeup final exam will not be offered to students because they are taking conflicting classes, since doing so is prohibited by the registrar.
The first two projects teach you how to write low-level imaging and graphics primitives, while being fun at the same time. The last project asks you to implement a 3D video game of your own design, in OpenGL. It will be impossible not to have fun on this project.
For all projects, you will demo your program to myself or a teaching assistant. Demos will be held in the Sweet Hall basement graphics labs during university business hours. For project #3, you are permitted to work in teams. If you do, then all team members must be present at the demo. To keep the project #1 and #2 demos fair, you will also be required to freeze your executable before 7:30am on demo day and to give your demo from that executable. A commented copy of your source code and a brief (1-2 pages) description of the functionality implemented are due online by 2:00pm the following day for projects #1 and #2, and two days later for project #3. These delays gives you a chance to sleep before writing up your project. ;-) We will describe in a later handout how code freezings and on-line submissions will be handled.
Evaluation criteria: Projects #1 and #2 will each count as 15% of your grade, project #3's first critique as 10%, and project #3's final demo and writeup as 20%. The project #3 proposal will not be graded; its purpose is for you to get feedback from us about your game idea. The midterm and final exams will each cover half of the material in the course, and will each count as 20%. Grading criteria on the projects will vary; typical criteria are correctness (40%), efficiency (20%), elegance (of your UI and your code) (20%), and originality (20%). Your workload and grade in the course will not depend on whether you are taking it for 3, 4, or 5 credits.
Collaboration: You may discuss the first two projects with friends, but you are expected to implement your own solutions. Sharing code or libraries is not permitted. On the third project (the video game), you are permitted (and encouraged) to form teams of two or three people and to partition the work among the team members. The work expected from each team will be proportional to the size of the team. Teams may discuss their project with other teams, but each team is expected to implement the project independently. Sharing code or libraries between teams is not permitted. The exams must be individual efforts, as usual.
Borrowing code: Using source code, libraries, executables, or data you find on the Internet (or elsewhere) is permitted, but only on the third project, and is limited to geometric models, textures, programming tools, and low-level utilities. In particular, borrowing the code that implements substantial game features is not allowed. Looking on the Internet for ideas, even looking at sample code you find there, is permitted and encouraged on all projects. However, when you do this, we expect you to cite your sources in your writeup.
The honor code: Every year, a few students in this class are caught sharing code or using code downloaded from the Internet. Aside from being unfair to your fellow students, these are violations of Stanford's Honor Code. In keeping with the Honor Code, we don't go looking for these violations, but they are relatively easy to detect, and when we find one, we prosecute it, and the penalties are real and severe. If you have any doubt about whether a form of collaboration or code borrowing is permitted, just ask us; we would be happy to ease your mind. Let's spend our time learning graphics, not policing each other.
Late projects: It is important that projects be completed on time. To allow for unforeseeable circumstances, you will be allowed one weekday of grace during the quarter for either a late demo or a late writeup. Beyond this, late demos or writeups will cause you to be penalized by 10% of your grade for that assignment per weekday that either is late. If both are late, you will only be penalized once, according to the maximum lateness among them. Late demos will be accommodated subject to the availability of the TAs. If the late demo slots for a particular day are full, you may be delayed another day, possibly incurring a penalty. On project #3, neither the demo nor the writeup may be late. Exceptions to these late policies will be made only in the case of a necessary (non-pleasure) trip approved in advance, or severe illness. If you do not submit one of the assignments at all, you will probably fail the course, even if you are taking it pass/fail. In this case, or if you believe you are in danger of failing, it is your responsibility to come talk to us before the end of the course. Incompletes are given only in exceptional circumstances.
Hardware: To do the projects you will have access to the Stanford Graphics Teaching Laboratory, located in two rooms in the basement of Sweet Hall. One contains 15 Dell Precision 420's (730 Mhz Pentium, 256 MB RAM, mixture of NVIDIA Quadro and GeForce3 graphics cards). The other contains 15 Dell Optiplex GX150's (1.0 GHz Pentium, 512 MB RAM, NVIDIA GeForce3 graphics cards). The first set of 15 are called firebird1 - firebird15, and the second set of 15 are called raptor1 - raptor15. They all run Linux 2.4.9-31 (RedHat 7.2). Use ssh rather than rlogin or telnet for remote access to these machines, but be aware that raptor1, 2, 13, 14, and 15 prohibit remote login. Students in CS 248 have non-exclusive priority access to the machines in these two rooms, whose doors are protected by card readers. Ignore any Sun (or other brand of) workstations in the rooms.
Software: For the first two projects, we provide a support package that runs on most X-compatible workstations, including those on the second floor of Sweet Hall. 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 PCs), 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. (For project #2, we are considering replacing this package with a more modern GUI toolkit; stay tuned.) For the third project, you will program in OpenGL, which runs on all the workstations in Sweet Hall.
Using other platforms: Grading of projects consists of face-to-face demos, which must be given in the basement of Sweet Hall. If you prefer working in another location, you may copy our support package (for the first two projects) and use it locally. All you need is X and Motif. (Stay tuned on this.) For the last project, your machine needs to support OpenGL. For project #1 and #2, you must make certain that your program runs on the Sweet Hall graphics PCs prior to demo day. Moreover, to help us judge the performance of your program, your program must be displaying on the same machine it is executing during your demo. For project #3, you must either make certain that your video game runs on the Sweet Hall graphics PCs on demo day, or you must bring your own demo machine to Sweet Hall.
Student accounts: The Sweet Hall basement PCs share accounts and file servers with the Sweet Hall machine cluster. 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, surf to http://consult.stanford.edu/accountinfo/.
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 the front-end program and X support package for the first two projects. See the README file for more information. (As mentioned earlier, we are considering replacing this package with a more modern GUI toolkit for project #2.) A copy of these tools will also be placed at the ftp site /afs/ir/class/cs248, accessible via sftp (ftp over SSH). You can also ftp to transfer.stanford.edu, but this is discouraged, as it requires sending your SUNet password in plaintext. By the way, pay no attention to the contents of /usr/class/cs248/old. These are similar but not identical to the projects we will assign to you.
World Wide Web: All class handouts, project assignments, reading lists, and lecture notes will be available via the Web at URL http://graphics.stanford.edu/courses/cs248-02. Hardcopy of selected materials (but not lecture notes) will be made available in class. SITN no longer offers courier service for materials that are also online, but you can print them out from the Web. A few copies of materials made available in class will also be placed in the handout cabinet in Gates Hall, wing 3B, copy room, (room 377).
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, looking for project partners, etc.
Emailing addresses: For questions directed to the TAs jointly and for other purposes that we will announce throughout the class, use cs248-tas@graphics.stanford.edu. To send email to the instructor or a particular TA, use the individual email addresses listed earlier in this handout. Do not send email to multiple primary recipients, except via cs248-tas; choose one recipient as your "To:" and make the others "CC:". Otherwise, you might get no response, or you might get multiple responses, and we'll get annoyed.
Class emailing list: For items of urgent and universal importance such as clarifications in the project 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 !! online after the first class by following the link at http://graphics.stanford.edu/courses/cs248-02
In case the delight of learning does not sufficiently motivate you to exert yourselves heroically on the projects, there will also be a video game competition. At 4:00pm on Wednesday, December 4, a judging will be held to select the best game made for project #3. While grades for the project are based mainly on technical merit, the competition will be judged on technical merit, compelling game play, and originality. 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 of considerable value.