Computer graphics projects.

I've created the following images over the last several years, basically for fun---they combine two subjects I'm very interested in, software and art. I can't claim these are interesting art, or all that interesting from a graphics programming point-of-view, but I've enjoyed creating these images. These were all programmed from scratch using C or C++. (The only libraries I used, other than math.h or other standard C libraries, were libraries for creating and saving jpg-format images.)

Here is a classic ray-tracing image, featuring shadows, recursive reflections (reflections in reflections), quadratic surfaces (spheres), and triangles (forming the rectangular solid). This uses the basic Phong shading model (combining ambient, diffuse and specular reflectivity).

Here is an image that includes implicitly-defined surfaces (surfaces defined by equations) more interesting than spheres. This includes a torus (donut) and the water (a surface defined using a damped cosine function). I should mention that none of these images include refraction of light (nothing is transparent).

This image shows a rugged landscape. The landscape was built from elevation data I downloaded from a certain USGS site; this is actually a bit of terrain from southeast Washington state, near Mount St. Helens. The terrain is just a triangular mesh; the full data set has millions of triangles in it (we're seeing only a portion here). I discovered using raw triangles gives the landscape an unnatural appearance because the individual triangles were visible, so I implemented a simple averaging scheme to smooth the triangles out. This scene also includes rudimentary texture mapping (the different colored 'strata' on the terrain).

The next image is actually a minor modification of the previous image. I've flattened out the landscape, and I've moved the sphere to the background and changed its reflectivity. I also moved the light source to coincide with the sphere. The intended effect is a desert landscape illuminated by the moon at night. This image was the first image I produced that was meant to be artistic in nature, as opposed to a graphics programming exercise or experiment.

This image is the same elevation dataset but viewed from above. The original dataset was a 1° by 1° square in southeast Washington state, including Mount St. Helens (visible in the lower right corner); this shows the entire 1° by 1° square. The goal here was modest---find Mount St. Helens in the data (something that eluded me in the previous renderings). My intention was to then produce a more dramatic rendering focusing on the volcano itself, but this test image turned out to be rather striking. (I still mean to work on this, but haven't had the time.) I should mention that this rendering includes more than 10 million triangles, but I found a reasonably efficient and simple way of rendering this scene. (The primary difficulty in ray-tracing complex scenes is narrowing down what triangles or other objects a ray of light will intersect. In this scene, I stepped down each ray in small steps, and only looked at triangles directly below each point on the ray as I did so. It was a simple idea but it worked well. One goal of mine is to implement a decent space subdivision scheme to allow me to render much more complex scenes.)

This image represents progress towards implementing a space subdivision scheme to allow rending more complex objects. This shows a Menge sponge rendered three levels deep. The space subdivision scheme is a somewhat rudimentary but functional SEADS (spatially enumerated auxilliary data structure). The sponge is made of 8000 cubes. Each cube is 12 triangles; there were 96,000 triangles total. The program that drew this was about 1500 lines of C code. Render time was several minutes for a 1024 by 1024 pixel image.