Joshua Davis: Random Generative System

Do any of you know how to make a Random Generative System, like the ones that Joshua Davis does?

I am doing a design project on it, and I would like to have a working example to play with, and show for my presentations, where i can add my own variables.