The Lawnmower engine

It's the incredibly simple 3d engine. While not perfect it will provide an understanding of matrices and 3d code for newbies, like myself.
This program simply draws a grid and allows the user to move around it. It doesn't account for several things so if you go past z=0 then the world starts wrapping/warping around. Good news though... it handles rotations correctly. This was written for Watcom 10.6, you shouldn't have to change to much to make the code compile with another compiler, probably just fix up the graphics code since I made calls to watcom's graphics library.

-= Commands =- (case sensitive)
a - fly left
d - fly right
w - fly forward
s - fly backward
e - fly up
c - fly down
4 - rotate left, yaw
6 - rotate right, yaw
8 - rotate down, pitch
2 - rotate up, pitch
7 - roll left, roll
9 - roll right, roll

r - restart the camera at beggining
q - quit the program

The code

mesh.zip everything that is to follow. Code and executable.
mesh.c the main bit of the program
matrix.c does all the matrix stuff
matrix.h header for matrix.c
mesh.exe the compiled program