I've been working on a ray tracer for the past two or three days. At this point, I have ambient, diffuse, and specular lighting, along with reflections. Finally, I have multisampling/antialiasing. Here's a sample render:

Example Scene

It's written in C++, and takes around 12 seconds to render the pictured image on my aging Athlon 64 3000+. It's about 1000 lines currently, and I plan on adding support for geometry beyond spheres, texturing, transparency, refraction, and whatever else crosses my mind.

I was wondering, for those of you have written this sort of thing, looking at my code, is my design alright, am I taking the right approach?

Source Code

Note, the source requires no dependencies to compile, unless you enable pthreads, by defining "ENABLE_PTHREAD_SUPPORT" in view.cpp.