software development and consulting

Some time ago, I wrote an n-dimensional raytracer in C++. It does a fair number of things, none of them efficiently, most of the rigidly.

There are a bunch of things that I wanted to do with it for a long time, but it’s been too slow and rigid to make any of those things fun.

Enter Lisp. As soon as it made it through my skull that Lisp is actually compiled (honest-to-goodness your-CPU instructions), I wanted to rewrite the whole thing in Lisp. I have finally gotten started on doing that. And, I just made it to the point where I’m actually tracing rays. Here is a stereo pair of a three-dimensional scene:

It use’s xach‘s ZPNG library for output, my OpenMPI library for sharing work across machines, and a thin layer that I wrote on top of Portable Threads for threading within a machine.

It doesn’t yet do reflections and refractions, directional lights, or most of the shapes that my old raytracer does.
But, it’s already got multithreading, MPI, more meaningful camera parameters, and functional color characteristics.

So, here’s the source code that generated the above images. Note that the one sphere has checkboarded diffuseness and the other has gradated phong-exponent and positional coloring.

Related posts:

Lisp Package Dependencies Some time back, xach posted information about all of the interdependcies amongst the Lisp packages available on Cliki. He had toyed with a few visualization techniques. Me, I tweaked some old code visualization stuff I had written to output where everything was after it stabilized. Then, I tweaked my ray...