Watch this video to find out what's going on:
https://www.youtube.com/watch?v=5N7NYc7PPf8
Hopefully you can copy the whole file and plop it into Processing 2.2.1, and it'll work there as well (and faster).
EDIT: Fixed some dumb bugs and mysterious magic numbers. Now if you want to change the window size to be bigger or smaller, just change the first line of the code (windowSizeMultiplier) to the number you want.