My Octopress Blog

A blogging framework for hackers.

OpenGLot

As a teaching tool for a course last semester, I put together an interactive plotter in openGL which I endearingly named “openGLot.” (For those who missed it, “openGL” + “plot” = “openGLot.”) See, I felt like I had to give it a very unsavory name so that if it ever became widely used, people would be forced to use its ill-sounding moniker.

At any rate, I originally wrote in Ruby, but have been slowly porting it to C++ with high hopes for its use and applicability. I still have a bunch of interactive demos for numerical methods (from Newton’s method to the trapezoidal rule for numerical integration) in the Ruby version, but I’ll be bringing those to the C++ version one of these days. I started a sourceforge project for it a while ago, which was kind of exciting.

At any rate, as a brief (albeit nerdy) respite from the academic onslaught today, I added a class for parameterized curves. [caption id=”attachment_618” align=”aligncenter” width=”289” caption=”A demo of a parameterized curve in openGLot”]A demo of a parameterized curve in openGLot[/caption]

I’ve got a bunch more primitives to add to it (scalar and vector fields, for example), but those will surely come one of these days. I’ve added adaptive mesh refinement (so that “busier” functions require more sampling to get a more accurate visual representation), but I’m still not quite happy with it. [caption id=”attachment_619” align=”aligncenter” width=”289” caption=”A "busy" function with no adaptive refinement”]A "busy" function with no adaptive refinement[/caption]

[caption id=”attachment_620” align=”aligncenter” width=”289” caption=”The same "busy" function with recursive refinement.”]The same "busy" function with recursive refinement.[/caption]

I’ve also got a 3D version, but that’s not been polished or formalized, but everyone loves a pretty graph: openGLot3D