My Octopress Blog

A blogging framework for hackers.

Graphing

For Scientific Computing, I decided I wanted to have a grapher with which I could programmatically interface easily. Of course, there are options other there, from gnuPlot to you-name-it, but I figured that it wouldn’t be too hard to write one myself. Especially since there’s a ruby port for OpenGL.

Long story short, I’ve got something that’s not too terrible. Not perfect, but it’s certainly a start: [caption id=”attachment_216” align=”aligncenter” width=”300” caption=”A few functions plotted with my grapher”]A few functions plotted with my grapher[/caption]

But then, I thought, “why stop there?” I figured it wouldn’t be that hard to make a 3D version. While the 2D one will work on any generic function you give it, this 3D one has it hard-coded in right now. Of course, it wouldn’t be too much more to make it more flexible, but given that this took 30 minutes, I’m ok with its rigidity. [caption id=”attachment_217” align=”aligncenter” width=”300” caption=”A simple surface.”]A simple surface.[/caption]

We’ll see where this goes. It makes me feel a little nerdy that I’m two days into my winter break, and this is how I’ve spent some of it.