I recently needed to create some patterns to use in a series of logos. We wanted the logos to be based on a generative pattern so we could create as many as we wanted to, with a large amount of variation. I thought about using Processing but wasn't sure how useful the vector output would be. I'd still like to know. But I thought I might need a high quality vector graphic to send to print as well as web, so I thought it would be a good opportunity to try scripting Adobe Illustrator.
Example output here: http://paulcarvill.github.com/GenerativePatternsWithIllustrator/
You'll see from the code that I was learning as I went, hence the proliferation of CONSTANTS I created every time I came up with a new setting which needed to be configured.
Have a play and let me know what you think.
This is for Illustrator as found in Adobe Creative Suite 5 (version 15.1.0). It probably won't work in earlier versions.