// Dartmouth CS 2, Winter 2009, Chris Bailey-Kellogg // Notes 13 | Sketch 2 int symm=3; // degree of symmetry int sz=20; // size of chips int rand=75; // control of random chip generation float a,da=0.01; // global rotation and increment // The chips and the current one to be added Chip[] chips = new Chip[100]; int current = 0; void setup() { size(400,400); noStroke(); background(0); rectMode(CENTER); for (int i=0; i5) sz-=5; if (sz<0) sz = 0; } else if (key=='S') { // Higher symmetry symm++; println(symm+"-fold"); } else if (key=='s') { if (symm>3) symm--; println(symm+"-fold"); } else if (key=='R') { // More random chips if (rand>5) rand-=5; } else if (key=='r') { rand+=5; } else if (key=='c') { // Clear for (int i=0; i