A schedule of lectures tells what I plan to talk about, and what I expect you to have read, by each class meeting.
I also taught this class in Fall 1995.
The textbook will be Interactive Computer Graphics, by Edward Angel, who has also provided a variety of supplements and resources, including on-line programming examples. Many of these examples have been downloaded and are available locally.
This semester, we'll use the graphics package OpenGL (see online documentation), together with the Graphics Library Utilities Toolkit (GLUT). As of September 15, both of these are installed and working on panther; we don't have them working on the Windows NT machines yet. (If you have a Windows NT machine yourself, with an up-to-date C/C++ compiler, you can install it yourself; see these instructions, thoughtfully provided by Uri Avalos.) But until we do, we can write graphics programs and run them on any X workstation, including whichever of the Windows machines have X servers installed.
Several example programs are in Appendix A of the textbook. For each of the following programs, I recommend that you copy it to your own directory, compile it, run it, modify it, run it again, \emph{etc.} until you thoroughly understand how it works. This is not to be turned in; it's just an exercise to get comfortable with programming in our environment.
Please read the online documentation for GLUT, particularly sections 1, 2, 3, 4, and 7.
Please read the online documentation for OpenGL, particularly section 2.13.
#include <GL/gl.h> #include <GL/glu.h> #include <GL/glut.h> ...in your C or C++ program and get it to compile. (If this doesn't work, try
#include "/usr/local/include/GL/gl.h"and so on instead.) You'll need to tell the C/C++ compiler what libraries to use. "-lglut -lGL -lGLU -lXmu -lXi -lXext -lX11 -lm" at the end of the command line should do the trick. Probably the easiest way to do all this is using the Makefile provided with the textbook examples: copy this to your own directory, and if you have a program whose source code is foobar.c, just type make PROG=foobar. You can then run the program by typing foobar.
Probably the easiest way to run these programs and look at the results
is to log onto one of the DEC Alpha workstations around campus
(e.g. wolf, adl11, adl12, adl13, adl14, etc.),
open a dxterm or xterm window, type
setenv DISPLAY adl12:0.0
or the equivalent for whichever workstation you're on, and run the
programs from the Unix command line in that xterm window.
Kris and Uri have also been installing X servers on some of the Windows
machines, so we can run programs on one of the Alphas and see the results
on the screen in our classroom. To do this, first find a computer with
an X server installed and double-click the "X Server" icon. You'll be
asked for an ID and password, which I gave out in class (ask me if you
didn't write them down). This will log you into the csc222 account on a
computer named "darksun", from which you can run programs pretty much as
above: open a dtterm or xterm window, type
setenv DISPLAY b33_006:0.0
or the equivalent for whichever computer you're on, and run the
programs from the Unix command line. However, since you're not logged in
as yourself, you don't have access to your own files. Note which
display you're on, type
rlogin panther -l myuserid
(using your own userid in place of "myuserid"), then
setenv DISPLAY b33_006:0.0
or the equivalent for your computer, and go to town.