/* dot_drawing.pde Edited by Justin Hsia (orig. Larry Synder) Draws dots where the mouse is in a color based on whether or not the mouse is pressed (conditional). */ void setup() { size(500,500); // set drawing canvas size background(255); // white background noStroke(); // no shape outlines frameRate(30); // slow down program (half-speed) } void draw() { if(mousePressed) { fill(0,0,255); // blue circles } else { fill(255,142,21); // orange circles } //fill(0); ellipse(mouseX, mouseY, 20, 20); // draw circle }