// Initialization void setup() { size(500,500); // Make the window bigger smooth(); // Make the edges smoother (anti-aliased) background(0,0,0); // Black background strokeWeight(2); // Thicken the lines drawn } // What to do every frame void draw() { if (mousePressed) { // Choose random red, green, and blue components of the fill and stroke color. // also make it a bit transparent fill(random(200,255),random(200,255),random(200,255),100); stroke(random(128,255),random(128,255),random(128,255),100); // pick a random radius and save it away float radius = random(50); // draw the ellipse ellipse(mouseX,mouseY,radius,radius); // draw a line connecting this position to the last one line(mouseX,mouseY,pmouseX,pmouseY); } } // START NO NOTES // code used to capture screenshots void keyReleased() { if(key == '`') save("sketch.png"); }