http://www.permadi.com/tutorial/raycast/ http://student.kuleuven.be/~m0216922/CG/raycasting.html Here are two tutorials on the subject. I tried making one of these (no textures), but never did fix the fisheye distortion problem. My version was also impractically slow. It looks like it's helpful to use matrix-based math.