Old raytracing in c++