32leaves.net

Visualizing Sorting Algorithms – my shot

These days I have to write some sort of reference card for basic sorting algorithms. Of course I wanted some sort of visualization of those algorithms on that card. The coolest sorting algorithm visualization I’ve seen so far has been created by Aldo Cortesi. He used Cairo to draw his stuff (according to his post learning Cairo was the whole point of this excercise).
Personally I still found those diagrams pretty hard to read if you really wanted to follow the algorithm. And of course I wanted to do something with Cairo, too. So I decided to rewrite the whole thing in C. My version shows distinct sections for each loop iteration (as most of those algorithms can be followed by thinking in that iterative loop way). In the diagrams below each number denotes the loop nesting level while B stands for being and E for end.
The source can be downloaded here and is under CC-BY-SA.

Live coding in Ruby

After I’ve been to the 25C3 and listened to quite a lot of electronic music there, I wanted to do something with visualization again. And while looking for a cool 3D engine for C++ (like Irrlicht), I stumbled uppon fluxus. But Scheme is really not my programming language (at least not yet :) ), so I wrote something similiar in Java using JOGL and JRuby.

Tonight I got the first visualization running on live data being broadcasted by my iTunes using OSC. Some source code and more teasers will follow. Meanwhile, have a look at the screenshot:

Btw. just to have that meantioned here, JRuby is extremely fast (at least the way I’m using it). The guys who wrote that awesome library did a wonderfull job. The next steps will be most likely add some more features (e.g. make the OSC stuff easier) and start playing arround with the SuperColider.

Fork me on GitHub