If anyone is looking for a gentle introduction into this sort of thing, Jeremy Ashkenas (of Underscore/Backbone hame) wrote a wonderful Ruby wrapper for Processing [0]. The syntax is remarkably simple (and Ruby!). Here's an example of the Mandelbrot set [1]
[0]: https://github.com/jashkenas/ruby-processing
[1]: https://gist.github.com/prezjordan/4391313