I converted my Processing app into a Max for Live MIDI Device. So this does not generate sound, just MIDI notes. You can position notes in the grid from a sin function. Rotate them around to simply create all sorts of patterns. The demos below were created by sending the midi to Live’s Scale Device then into Live’s Collision Device.
Can also be found here: http://www.maxforlive.com/library/device.php?id=78