This is one of the wonderful detours programming takes me on from time to time. What I really wanted to do is work a little bit more on my neural network code. Next up was a back-propagation algorithm for learning. There are plenty of examples of it, but few that give a decent explanation of the why. And even fewer that can show me the ‘why’ in pretty pictures - I’m a visual learner, so that always helps.

After quite a bit of reading up, I finally got the idea that all this is is a gradient descent - but my math is rusty enough that I really like to see a visual explanation of it, too. (Yes, I get the math. I just want the pictures, by now). So I decide to create them myself - if something’s missing on the web, you go and add it.

Except I want to do it programatically, since my art skills are close to non-existent. And my mind is focused on Ruby, so that’s the language I want to do it with. Turns out that searching for ‘]ruby osx opengl](http://www.google.com/search?hl=en&client=safari&rls=en-us&q=ruby+osx+opengl&btnG=Search)’ is not that helpful. A few searches later, I finally figure out that the proper serch term would have been ‘rubycocoa opengl‘ instead. Which tells me right in the first hit that Apple is actually kind enough to ships a sample application with RubyCocoa.

So to get started with Ruby, OSX, and OpenGL, just take a look at /Developer/Examples/Ruby/RubyCocoa/CocoaGL - and you’re set to go. Now I’m off to do some heightfield rendering in OpenGL - unless I get sidetracked again.

Leave a reply