Comp 236, Assignment 5
This applet allows you to interactively fly through a maze.
Use these keys (some have more than one alternative):
Movement |
Key |
Forward | Up arrow, 8 |
Backward | Down arrow, 2 |
Turn left | Left arrow, 4 |
Turn right | Right arrow, 6 |
Pitch down (Dive!) | W |
Pitch up (Pull up!) | S |
Roll left | A |
Roll right | D |
Slide left | Q, 7 |
Slide right | E, 9 |
Color & depth info | Mouse click |
NOTE: You may have to click once on the applet panel before the keys will work.
(This tells Netscape to send the keys to the applet).
New Features:
- Maze File! You are walking around a maze (be patient, it's a bit slow).
- Collision detection. You can't walk through walls, even if you are floating above them.
- Texture mapping. Perspectively correct and everything.
- Lighting model - light is sitting on your head, and gets dimmer as things
get farther away.
Fixed Bugs:
- Movement is now accomplished by moving the eye and lookat points, and then
re-computing the transform matrixes at each step, so this eliminates any disortion
from numerical errors that was happening before.
Known Bugs:
- Clipping is still done by throwing away any point or triangle
which extend behind you, so walls tend to disappear and reappear.
- You can walk through a wall if you do so through the corner.
Source Code:
Here's a browsable directory.
Some of this code was borrowed from Leonard McMillan's code, which he has made available as
part of assignments for Comp 136. Part of the code was also adapted from example applets
provided by Sun with their JDK.
Our textbook explains all of the 3D techniques we are using in these assignments:
Foley, van Dam, Feiner, Hughes. Computer Graphics: Principles and Practice, 2nd Ed. in C,
Addison-Wesley, 1996.
Last modified: April 7, 1997. Aron Helser