Mark "Monty" Montague

Coding Samples

These coding samples are made available only for the evaluation of the author for employment. License is granted to copy, print, compile, and run computer programs available here only in that capacity, and only for the duration of employment evaluation, and all other rights are reserved by the author. Anyone wishing to use this code for other purposes is invited to contact the author.

I've also included some notes on debugging techniques since it's hard to evaluate those skills from code samples.

Jray

In order to have a self-contained yet significant code sample, I decided to implement a ray tracer from scratch in Java. This took me about a week in my spare time.

Because this is intended more as an example of ability than a final product, there are a few intentional deficits. In particular, efficiency has been largely dropped for clarity, ease of programming, and need to fit into Java's rigid framework without too much contortion. To this end, I have left bounding surfaces completely unimplemented, and have skimped on optimization of memory usage.

It's also noteworthy that I have cast vectors in the "jvec" class to either location or direction subclasses, at a substantial object creation cost, in order to have better automatic error checking at compile time. This has caused some amount of ugly casting to get around Java's lack of templates and implicit polymorphism on return context, but was useful in rapid prototyping and reduction of suffering from minor "thinkos."

I'll also note that although I didn't see an appropriate use for Java interfaces in this project, I don't avoid them in general. Making "tracable" an interface rather than an abstract base class seemed too contrived, and violates the "is a" versus "has a" distinction.

Caveats

The code is available as a gzipped tar file or as individual files in a directory.

Tracedist, a Perl script which got into an Art Show

At the SIGGRAPH conference in 1995, when I registered, I was given an "Art Show Contributor" ribbon, much to my amazement. After I had suppressed the urge to go buy a black beret and complain that no one understood my work, I thought back on the events that led to this.

In fact, when Kurt Fleischer was working on a submission for SIGGRAPH 95, I offered him some help. What he urgently needed was the ability to raytrace the complex objects he could create with the 3-D version of his cellular textures in as little a time as possible. Since the raytracer he was using could run on several of our machine types (our lab has received workstation grants from HP, DEC, and IBM), we decided it would help a lot in making the deadline to split up rendering across these architectures.

So, while in one day or so, I hacked out a "quick and dirty" perl script which could cast off sub-images to the various machines with the right parameters, and then re-integrate them into the final image. I'm presenting it here because it's an example of the fact that I can use a combination of existing tools and new code to address an immediate need without sacrificing readability and reusability, and because it is officially my first piece I've had (implicitly) in an art show. Well, what the people in the art show saw was this...

... but my artistic contribution was really a perl script.

framedumpyuvi

This is just a code fragment in C++ to filter images for display on interlaced NTSC. It's not object-oriented, but is just intended as an example of my ability to write C and C++. It includes the very small header file and the more relevant C++ code. The point of this was to take a sequence that had been designed to be interactive in OpenInventor and dump it to video, so a lot of it is dealing with rendering on fields. It also includes a "phantom" logo on the bottom like a lot of TV channels are now using.