Computer Science Canada

Raycasting

Author:  Martin [ Tue Apr 08, 2003 5:45 pm ]
Post subject:  Raycasting

I'm not going to write a tutorial for it, because a) It's too long, and b) somebody already wrote an amazing tutorial on it. Here's the link, enjoy.
http://www.permadi.com/tutorial/raycast/index.html

Just a note on making this a bit easier. Sit down with a pen and paper (or pencil and paper, whatever) and work on proving all of the math. And then change it around so that it's a normal cartesian plane:

y increases
^
|
|
|
|_______>x increases

Also, remember that 1/tanX = 1/sinX/cosX = cosX/sinX = cotX
Just a tip to avoid divide 0 errors.

Oh, and remember that TURING IS SLOW. Try to be as efficient as possible, even if it means that your graphics are a bit lacking.

Goodluck Very Happy

P.S.
His site has some other cool stuff too, check it out.


: