GLUT 3.1 distribution
contrib examples
This directory contains eleven contributed GLUT programs
NOTE: ../../lib/glut/libglut.a is
employed to generate the binaries in this directory. Hence, if
you wish to copy over any specific program for the purposes of
experiementation and recompilation, you'll need to either
- download this entire directory, plus,
../../GL/glut.h, as well as
../../lib/glut/libglut.a.tar.Z,
or,
- get everything by simply grabbing the entire
../../glut-3.1.tar.Z (1,158,329 bytes)
3.1 version of the GLUT distribution, to get everything
that way.
The following programs are available from this contrib directory:
- agv_example: AGV: a glut viewer
The two view movement modes are POLAR and FLYING. Both move the eye, NOT
THE OBJECT. You can never be upside down or twisted (roll) in either mode.
Controls for Polar are just left and middle buttons -- for flying it's
those plus 0-9 number keys and +/- for speed adjustment. This isn't meant
to be a library, just something to graft onto your own programs.
- agv_example.c: Example
program to show how to use AGV
- agviewer.c and agviewer.h: Routines for viewing a 3d scene w/ glut
I welcome any feedback or improved versions.
- fractals: fractal mountains and trees
Draws fractal mountains and trees -- and an island of mountains in water
(I tried having trees on the island but it didn't work too well.) Two
viewer modes: polar and flying (both restrained to y>0 for up
vector). Keyboard 0->9 and +/- control speed when flying. Only
keyboard commands are 0-9 and +/- for speed in flying mode. Fog
would make the island look much better, but I couldn't get it to
work correctly. Would line up on -z axis not from eye.
- fractals.c bulk of the program is here
- fracviewer.c and
fracviewer.h are virtual replicas
of agviewer.c and agviewer.h
I welcome any feedback or improved versions.
- gears: rotating intersecting solid gears
- hanoi: animated solution of the tower of hanoi problem
- hanoi2: advanced gfx and I/O animated tower of hanoi solution
- lineblend: 2D interactive color line smearing program
Left and middle buttons drawn colored lines, right button brings up a menu
with a few options. If you draw for long enough and then hit pick
"redraw" (or resize or uncover the window) it takes so long to redraw
all the lines it is kind of like a kaleidoscope animation. Or something.
- lineblend.c
I welcome any feedback or improved versions.
- moth: flys around light in a whirling courtyard
Scene objects are built into display lists in the 'myInit' function
(look for three rows of I's). Objects are assembled and motion
described in the 'display' function (look for three rows of $'s).
- moth.c
by Robert Doyle, Naval Research Laboratory, Washington, DC.
- noof: some sort of smearing geometric flowers
- rings: Do a slow zoom on a bunch of rings
Homework 4, Part 1: perspective, hierarchical coords, moving eye pos.
- rings.c
I welcome any feedback or improved versions.
- steam: Miniature Steam Engine Simulation.
Interactive 3D graphics, Assignment #1. Transparence doesn't quite
work. The color of the underlying object doesn't show through. Also
only the front side of the transparent objects are transparent.
- steam.c
- text3d: 3D text rotates then translates the letters "M O T H"
- text3d.c
by Robert Doyle, Naval Research Laboratory, Washington, DC.
- worms: 2D OpenGL using the GLUT interface to the underlying
window system
LEFTMOUSE makes the worms converge on the spot for a while,
then go back to their business. The animation is incredibly
simple: we erase the tail, then draw a new head,
repeatedly. It is so simple we don't even need doublebuffering!
- worms.c
by Jeff R. Allen, jallen@cs.hmc.edu
Additional files of interest:
Reference
OR, ...
Copyright © 1995-96, Silicon Graphics, Inc.