/* title: Funky Chunk 16 description: random pattern generator created: December 2, 2008 by: Rosie Wood */ // define Global variable values //These are constant variables and therefore they are not changed //by the program. Setting their value here in one place helps with maimtenance int sizeWindow=400; int centre=sizeWindow/2; int xpos = centre; int ypos = centre; int patternsPerPicture=round(random(2,50)); //this variable is changed frequently by the application int interval=30; // set the sketch window size and background //turn off fill so that patterns underneath can be seen //set the rate that the screen refreshes at (found this value was best for this application?) void setup(){ size(sizeWindow, sizeWindow); background(0); stroke(204, 102, 0);//colour red noFill(); frameRate(.2); draw();} void draw(){ //local variables int count=0; int design=round(random(1,9)); //a random number for which design to use in the switch background(0); for(count=0;count