// Simplified from Reas & Fry 22-09 void setup() { size(400,200); smooth(); strokeWeight(2); } void draw() { if(frameCount > 1) return; // do in once only background(0); drawT(width/2, height, width/4); } void drawT(int x, int y, int r) { // a new color each time stroke(random(128,255),random(128,255),random(128,255)); line(x, y, x, y-r); // vertical line(x-r, y-r, x+r, y-r); // horizontal if (r>1) { // only continue stacking if half size will be non-zero drawT(x-r, y-r, r/2); // stack on left side drawT(x+r, y-r, r/2); // stack on right side } } // START NO NOTES // code used to capture screenshots void keyReleased() { if(key == '`' && !online) save("sketch.png"); }