Much of my computer programming nowadays is scientific modeling in Mathematica. But I've also maintained programming as a hobby since 1993. This page lists some of the software that I've released, as a kind of personal journal (not a professional portfolio). Some of the software has become obsolete as I've switched platforms (MS-DOS, Mac OS, BeOS, Mac OS X, iOS) and languages (Pascal, C, C++, Objective-C, Perl, Python) over the years. There are three broad, overlapping categories: graphics/visualization, math/science, and utilities.
In geology, the orientation of a plane is described using the concepts of strike and dip. Strike Line is a simple iOS app that uses the device's accelerometer to draw the strike line and display the dip angle of the device itself. (This is all that can be done with the current iPod Touch hardware.) Strike Line is free at the iOS App Store.
Here are a couple of little Mathematica notebooks for geology. The first notebook is Appendix F to our paper Davis and Titus (2011), Homogeneous steady deformation: A review of computational techniques. Non-geologists who are into linear algebra may appreciate the
matrixLog function, because Mathematica doesn't have one. The second notebook is a collection of utilities for converting among geometric measurements and making hemispherical plots.
Bopagopa is a simple 2D/3D graphics library for Python 2.x, that abstracts many of the low-level details of OpenGL. For example, it automatically generates GLSL shader programs based on the user-programmer's rendering choices. I wrote it while teaching computer science, so that my students could make some decent graphics and animations. Due to various dependencies it's not easy to install. On the plus side, it comes with 16 friendly tutorials. You can download version 2010 October 12 or view the reference online.
OpenGL has a selection mechanism that facilitates certain tasks such as picking and collision detection. Selection is deprecated now — in Bopagopa I pick using the back buffer instead — but on mailing lists there are still people trying to learn how to use it. So I've isolated my old PyOpenGL selection code to serve as an example for them.
Differentiating functions is an essential part of any introductory calculus course. Around 2007, when I was teaching calculus, I wrote a Python CGI script to randomly generate and automatically solve differentiation problems. For complicated problems the formatting isn't pretty, but at least the content is correct. You can view the source code or practice yourself online.
Around 2006, when I was teaching mathematics, I required my students to respond to reading comprehension questions via e-mail. I was also interested in learning a little Perl. So I wrote a short Perl program to process all of the messages I was getting. You can read about the assignments or jump to the code.
This brief tutorial from 2004 describes how OpenGL's polygon offset facility can be used to make any 3D image look like a colored line drawing, by "inking" the edges of the shapes in the image. This technique is now obsolete; shaders can accomplish the same effect, faster and better. Anyway, here's the tutorial.
When I started programming on Mac OS X in the spring of 2001 I spent a couple of years developing this high-level 3D graphics library in Objective-C/Cocoa/OpengL. Compared to serious 3D engines it is quite rudimentary, but it's sufficient for simple 3D programs such as Blow-Up Visualizer and Strain Simulator (below). It could also serve as a tutorial for people who are learning OpenGL or Objective-C. Some of its key ideas live on in Bopagopa (above). Brent Gulanowski has used it; I'm not sure anyone else has. You can download version 2003 September 1 (1.6.0) or view the manual online.
This Objective-C/Cocoa program illustrates the concept of blow-up, which is typically studied in graduate courses in geometry. Specifically, it displays a 3D immersion of the blow-up of the two-dimensional sphere at a point, and lets you play around a bit. This application requires Mac OS X PowerPC or the Rosetta emulator. View a screen shot or download version 2002 March 18 (1.0.0).
This Objective-C/Cocoa program visualizes linear transformations in 3D. While it could be useful to anyone studying linear algebra, Strain Simulator is specifically designed to help students of structural geology, where linear transformation is used as a simple model of rock deformation. Special features include volume preservation, material points, and translucency. This application requires Mac OS X PowerPC or the Rosetta emulator. View a screen shot or download version 2001 June 9 (1.0.1).
For several years starting around 1993, I entertained the notion of writing a large computer game single-handedly. The game, called SMea, began as 2D on Mac OS in C, and eventually transitioned to 3D on BeOS in C++. At its largest it was about 18,000 lines of C code. Needless to say it was never finished. If you can find a classic Mac or a PowerPC Mac OS X machine with the Classic emulator, then SMea will still run, although it's not much of a game. You can view screenshots from version 0.06 and version 0.03, or download version 1996 August 23 (0.03). And here's a bonus: Pascal source code from 1993.
I wrote this little Mac C program around 1995 to perform number-theoretic calculations for me. If you can find a classic Mac or a PowerPC Mac OS X machine with the Classic emulator, then Integer Calculator will still run, amazingly. View a screen shot or download the application.