Oops, kareha ate the indentation. I C&Ped that from http://en.wikipedia.org/wiki/Raytracer#Algorithm:_classical_recursive_ray_tracing go there