CS 381: Computer Graphics

CS 381, Fall 2003
Computer Graphics

This web page is intended for students in Glenn G. Chappell’s CS 381 class at UAF, fall 2003. Others are welcome. Linking to things listed here is fine, but be advised that this site will probably disappear some time in mid-2004.

Department: °Mathematical Sciences, °U. of Alaska Fairbanks
Instructor: Glenn G. Chappell
Office: 201B Chapman
Office phone: (474-)5736
E-mail: ffggc@uaf.edu
Paper mailbox: Inside the Math Dept. office (101 Chapman)

Announcements

Course Materials

Materials are listed with the most recent at the top. See below for links.

Week Class Meetings Assignments Handouts, Sample Code, Etc.
Finals Week 
12/15–12/18 
  • Wednesday 12/17: Final Exam 1–3 p.m. in the classroom
    Late homework deadline: 1 p.m.
   
Week 14 
12/8–12/12 
  • 12/12: Shadows using textures
  • 12/10: More on environment mapping
    Slides: HTML, PowerPoint
  • 12/8: Advanced texturing methods: procedural texture, bump mapping, environment mapping
    Slides: HTML, PowerPoint
 
  • Week 14 Review Problems
    Not to be turned in!
    Posted Tue 12/16
  • shadowtex.cpp (C++ source)
    Shadows via Textures
    Posted Sun 12/14
    Distributed in class Fri 12/12
  • envmapfuncs.cpp (C++ source)
    Program Fragment: Functions for Environment Mapping
    Posted Wed 12/10
    Distributed in class Wed 12/10
Week 13 
12/1–12/5 
  • 12/5: More texturing details; introduction to procedural texture
    Slides: see slides under 12/8.
  • 12/3: Class cancelled
  • 12/1: Details of texture mapping
    Slides: HTML, PowerPoint
  • Final Exam Information & Week 13 Review Problems
    Not to be turned in!
    Posted Mon 12/15
  • qdtexture.cpp (C++ source)
    Example of “quick & dirty” texture generation
    Posted Fri 12/5
  • Pnoise 1.2 Package Documentation
    Documentation for the Pnoise package (the pnoise.h file)
    Posted Fri 12/5
    Distributed in class Fri 12/5
    Revised Sun 12/7
  • pnoise.h (C++ source)
    Pnoise 1.2: Perlin noise package, for procedural texture
    Posted Fri 12/5
    Revised Sun 12/7
  • proctexture.cpp (C++ source)
    Procedural texture demo
    Requires pnoise.h
    Posted Fri 12/5
    Distributed in class Fri 12/5
    Revised Sun 12/7
  • twotextures.cpp (C++ source)
    Using binding to support multiple textures
    Posted Fri 12/5
Week 12 
11/24–11/28 
  • 11/28: No class (Thanksgiving break)
  • 11/26: Introduction to mapping (blue 7.5); texture mapping (blue 7.6)
    Slides: see slides under 12/1.
  • 11/24: Images in general (blue 7.1–7.3); images in OpenGL (blue 7.4)
    Slides: HTML, PowerPoint
 
  • Week 12 Review Problems
    Not to be turned in!
    Posted Mon 12/15
  • texture.cpp (C++ source)
    Example of Texture Mapping
    Posted Mon 12/1
    Distributed in class Wed 11/26
  • simpletexture.cpp (C++ source)
    Simple Example of Texture Mapping
    Posted Mon 12/1
    Distributed in class Wed 11/26
  • Also distributed in class this week: drawimage.cpp (see Week 7).
Week 11 
11/17–11/21 
Week 10 
11/10–11/14 
  • 11/14: Normal vectors; moving lights (blue 6.4, more of 6.7–6.8)
    Slides: see slides under 11/12.
  • 11/12: The Phong model; OpenGL lighting (blue 6.3, 6.7–6.8)
    Slides: HTML, PowerPoint (includes 11/14 slides)
  • 11/10: Introduction to lighting (blue 6.1–6.2)
    Slides: HTML, PowerPoint
Week 9 
11/3–11/7 
  • 11/7: Test 2
  • 11/5: Shadows via projection (blue 5.10)
    Slides: HTML, PowerPoint
  • 11/3: Mouse-based viewing & navigation
    Slides: HTML, PowerPoint
 
Week 8 
10/27–10/31 
  • 10/31: Advanced viewing: zoom & pan, driving, flying
    Slides: HTML, PowerPoint
  • 10/29: Projection in 3-D (5.4–5.5, 5.9)
    Slides: HTML, PowerPoint
  • 10/27: Introduction to 3-D viewing (blue 5.1–5.3)
    Slides: HTML, PowerPoint
  • Test 2 Information & Week 8 Review Problems
    Not to be turned in!
    Posted Tue 11/4
  • city.cpp (C++ source)
    Draw a Simple City Scene
    Posted Fri 10/31
    Distributed in class Fri 10/31
  • unproject.cpp (C++ source)
    Converting from Window to World Coordinates
    Posted Thurs 10/30
  • printmatrix.cpp (C++ source)
    Printing a Transformation Matrix
    Posted Wed 10/29
    Revised Wed 10/29
    Earlier version distributed in class Wed 10/29
Week 7 
10/20–10/24 
  • 10/24: Some notes on 3-D
    Slides: HTML, PowerPoint
  • 10/22: More on transformations in 3-D
    Slides: see slides under 10/20, 10/24.
  • 10/20: Homogeneous form; introduction to 3-D graphics (blue 4.4)
    Slides: HTML, PowerPoint
  • Week 7 Review Problems
    Not to be turned in!
    Posted Sat 11/1
  • drawimage.cpp (C++ source)
    Example of Raster Image Drawing & Zooming
    Posted Tue 10/21
    Distributed in class Mon 11/24
  • start3d.cpp (C++ source)
    A 3-D OpenGL/GLUT Program to Start With
    Posted Mon 10/20
    Unfinished version distributed in class Mon 10/20
Week 6 
10/13–10/17 
  • 10/17: Meet in ARSC Discovery Lab, 375C Rasmuson Libary, for VR demos
    Slides: HTML, PowerPoint
  • 10/15: Matrices & transformations (blue 4.3, 4.5, 4.6, 4.7)
  • 10/13: Scalars, points, and vectors (blue 4.1, 4.2, a bit of 4.3, appendix B)
 
Week 5 
10/6–10/10 
  • 10/10: More on widgets; misc. topics
    Slides: HTML, PowerPoint
  • 10/8: Build-a-button
    Slides: HTML, PowerPoint
  • 10/6: Notes on Test 1; using selection mode (blue 3.7.1); introduction to widgets (not in text)
    Slides: HTML, PowerPoint
  • Week 5 Review Problems
    Not to be turned in!
    Posted Fri 10/10
  • colorchange.cpp (C++ source)
    Example Program for Button class
    Requires button.h, button.cpp.
    Posted Fri 10/10
  • button.h (C++ source)
    Header File for Button class
    Posted Fri 10/10
    Distributed in class Wed 10/8
  • button.cpp (C++ source)
    Source Code for Button class
    Posted Fri 10/10
  • timedep.cpp (C++ source)
    Time-Dependent Motion Demo
    Posted Thu 10/9
    Revised Fri 10/10
  • Test 1 Solutions
    Posted Mon 10/6
  • selectionmode.cpp (C++ source)
    OpenGL Selection Mode Demo
    Posted Sun 10/5
  • select.c (C source)
    OpenGL book example 13-2, pp. 537–540
    Selection Example
    Posted Sun 10/5
Week 4 
9/29–10/3 
  • 10/3: Test 1
  • 10/1: More on picking
    Slides: HTML, PowerPoint
  • 9/29: Advanced menuing; introduction to picking (blue 3.7 [not 3.7.1 yet])
    Slides: HTML, PowerPoint
  • Week 4 Review Problems
    Not to be turned in!
    Posted Wed 10/1
  • readpixel.cpp (C++ source)
    Example Pixel-Reading Program
    Posted Wed 10/1
    Distributed in class Wed 10/1
  • mouseinrect.cpp (C++ source)
    Demonstrates Mouse-in-Rectangle Checking
    Posted Wed 10/1
    Distributed in class Wed 10/1
  • dumbsubmenus.cpp (C++ source)
    Demo of GLUT Submenus
    Posted Mon 9/29
    Distributed in class Mon 9/29
  • menuchange.cpp (C++ source)
    Demo of Changing GLUT Menu
    Posted Mon 9/29
    Distributed in class Mon 9/29
Week 3 
9/22–9/26 
Week 2 
9/15–9/19 
 
Week 1 
9/8–9/12 
  • 9/12: Programming with OpenGL and GLUT (blue 2.6–2.8)
    Slides: HTML, PowerPoint
  • 9/10: Basic OpenGL (blue 2.1–2.4)
    Slides: HTML, PowerPoint
  • 9/8: Linear interpolation (not in text); brief introduction to OpenGL
    Slides: HTML, PowerPoint
Week 0 
9/4–9/5 
  • 9/5: Course overview; introduction to CG (blue chapter 1)
    Slides: HTML, PowerPoint

Links

External links (marked with a red dot °) last checked December 19, 2003.

Primary Course Links

°Interactive Computer Graphics
A companion web page for the blue text, by the author.
Example Programs (directory)
This directory contains source code for all example programs in the OpenGL Programming Guide (“the red book”). Some of these differ slightly from those in the text.
°OpenGL.org
The official site for OpenGL, the graphics library used in this class. If you look around, you can find a fair amount of sample code.
°OpenGL Documentation
This is a web-ified copy of the OpenGL man(ual) pages. It is a bit out of date (OpenGL v1.1), and it is not a tutorial, but if you want to look up the spec’s for an OpenGL function quickly, this is the place to go. If you have problems with this site, here are some sites with the OpenGL 1.0 manual pages: °Site 1, °Site 2, °Site 3, °Site 4.
°GLUT
The homepage for the OpenGL Utility Toolkit (GLUT) by Mark J. Kilgard.
°GLUT Documentation
Some nice documentation, written by the author of GLUT.
Download GLUT for Windows
My own page on GLUT for Windows. If users of other OS’s want to give me any tips on getting GLUT running on the systems they use, I would be glad to expand this page beyond Windows.

Other Links

The C++ Standard Template Library

°SGI - Standard Template Library Programmer's Guide
Some very nice, well organized documentation for the STL. It is not a tutorial, but if you know what you are looking for, and you already have a basic idea how the STL works, then you can find what you want quickly and easily. I have found the “Table of Contents” link to be the most useful starting point when I reference this page. Note: This site includes documentation for some non-standard SGI-only extensions of the STL (slist, rope, etc.).
°Phil Ottewell's STL Tutorial
(If the link above gives you trouble, try this °PDF version.) This is an STL tutorial that many people seem to think well of. I did not learn STL from this tutorial myself, so I cannot say how good it is pedagogically. However, it does appear to be thorough, correct, and (unlike a number of STL tutorials on the web) up-to-date. If anyone works through this tutorial, please let me know what you think of it.

Learning OpenGL

OpenGL/GLUT Articles by by Miguel Angel Sepúlveda
This series of tutorial articles on OpenGL and GLUT appeared in °LinuxFocus (online magazine) in 1998. Unfortunately, I can find no single online index that lists all the OpenGL/GLUT articles, so here is my own list:
°OpenGL Tutors by Nate Robbins
This is a series of programs that allow the user to investigate various concepts in OpenGL by interactively changing parameters and viewing the result. “Tutors” are provided for fog, materials, textures, primitives, and various aspects of transformations. The pictures on the page illustrate the programs. The code is available in a ZIP file, through the link at the beginning of the page. I have not tried these, but many people speak highly of them.
°OpenGL Lighting, Shadows and Rendering Code
Mark Kilgard’s “way cool, way fast” OpenGL code sampler has been combined with code from other people on this page. The result looks good, but I have not checked it out in depth. More stuff is available in this links on the left side of the page.
°Performance OpenGL Course Material
Material related to a short course on “Performance OpenGL: Platform-Independent Techniques”, by Dave Shreiner and Brad Grantham of SGI. The site is a little bit disorganized, but contains some very worthwhile material. In particular, the first link on the page leads to PowerPoint slides from the 2002 version of the course, which I took and found very helpful. Lots of other stuff is available from the other links.

Bump Mapping

°Spherical Bump Mapping with BMRT
Very nice, realistic, bump-mapped images of balls.
°Bump Map and Displacement Map Images by David Callele
Various renderings of a dragon, illustrating the increasing realism obtained by using increasingly complex effects.
°Nishita’s Images
Various images by a CG researcher. In particular, see “Diffraction and Bump mapping”.
°Extended Ray Tracer
A project description for a CG class, topic: adding features to a ray tracer. Includes images illustrating advanced ray-tracing techniques, including bump-mapping.

Procedural Texture

°Making Noise
Slides from a talk by °Ken Perlin about his noise-based procedural-texture techniques.
°Perlin Noise Reference Implementation
Perlin’s code for his noise function.

General

CS 481/681, Spring 2004
The CS 481/681 (Advanced Computer Graphics) web page for the spring 2004 semester.
°Animusic
The website of the Animusic company, which has put together a unique video showing computer-generated instruments playing original music. IMHO this is the niftiest CG product ever.


CS 381, Fall 2003 / Last update: 9 Feb 2004 / Glenn G. Chappell / ffggc@uaf.edu