This course will focus on lighting and rendering, curves and surfaces, and ray tracing, with some coverage of raster methods. We will primarily use the OpenGL library.
We'll use these texts for the course:
F. S. Hill, Jr., Computer Graphics Using Open GL, Second Edition, Prentice Hall, 2001. Required text. (Same book as I used in Fall, 2003, CS 116a.)
The OpenGL Programming Guide, (also known as the Red Book,) Fourth Edition. (Addison Wesley) Supplemental text, recommended.
CS 116A is a prerequisite, and students should be familiar with the theory and practice of using Open GL to create and view three-dimensional shapes in perspective.
116B will focus on these parts of Hill's book:
Chapter 8 (Detailed coverage): Lighting models, texture maps, and rendering.
Chapter 9 (Light skim): Raster methods, pixel maps, line drawing and fill algorithms.
Chapter 10 (Detailed coverage): Designing curves and surfaces: Bezier, spline, NURBS.
Chapter 13 (Light skim): Hidden surface removal.
Chapter 14 (As much as possible): Ray Tracing
We'll supplement some of Hill's material with information from the OpenGL Programming Guide, for instance as regards textures and alpha transparency.
The programming environment will be C++ and OpenGL. Our graphics programs will run under Windows in small DOS-like GLUT windows, a little like Java applets. I recommend getting one of the Microsoft compilers: the (outdated) Microsoft Visual Studio Version 6.0 or Microsoft Visual Studio.NET. SJSU has a license so that you can obtain Visual Studio.NET very nearly for free. You must use C++ and not Java. If you have trouble with C++, or are rusty with it, read this quick review of C++.
For some of our homework assignments we may work with Rucker's Windows+OpenGL Pop game framework.
Although your computer will probably have gl.h, glu.h, opengl.lib and glu32.lib, it may lack the glut files. You can get these off the web from www.opengl.org. Instead of going to opengl.org, you can download Version 3.7 here.
You have to do the following with these three files that you get:
Put glut.h in your Visual Studio include\gl directory, like in
Program Files\Microsoft Visual Studio\VC98\Include\GL
Put glut32.lib in your Visual Studio LIB directory, like in
Program Files\Microsoft Visual Studio\VC98\Lib
Put glut32.dll in your Windows SYSTEM32 directory, like in
I think it is wise that the three files be from the same version of GLUT or you may have compatability issues. If you put one file on your disk, put the other two as well, otherwise you may have different versions and you will get weird runtime error messages. Another posible cause of difficulty is if you have glut.dll or glut.lib anywhere on your hard disk, as these were designed for use with SGI machines, not Windows machines. The "32" means "Windows" in this context, so only use glut32.lib and glut32.dll.
Also be sure that your Visual Studio Project | Properties | Link | Object/Library
Modules has these three libraries (type them in if not present, and do for Settings
For: All Configurations).
glu32.lib glut32.lib opengl32.lib
When handing in a homework or giving an executable to a friend, it is a good idea to also pass on a copy of the glut32.dll that is on your machine. This prevents compatability problems.
You can download a ZIP file with C++ source code for many of Hill's examples from a page off his book website www.prenhall.com/hill
The "Red Book" is online, but I think it's very much worth purchasing.
Grades will be based on homework (~100 pts), on the midterm (~80 pts), and on the final (~100 pts). I plan for a long independent project as the last homework. We'll probably have three big homework assignments, each involving several of programs.
Assignments are due at the START OF CLASS on the due dates. Homework is marked down 20% if late one class, 40% is late two classes, and isn't acepted after that. WARNING: Skipping a homework assignment can sometimes lower your final grade by as much as a full grade point.
Cheating policy: Copying on an exam will result in a score of 0 on that exam
for both parties.