Move your mouse, and click the buttons.
Is fun, no?
int oldx = 0;
int oldy = 0;
int r = 0;
int stroke_weight = 5;
void setup(){
size(800,600);
background(255, 255, 255, 0);
}
void draw(){
// input
if (mousePressed && (mouseButton == LEFT)) {
r = int(random(255));
stroke_weight = int(2 + random(10));
} else if (mousePressed && (mouseButton == RIGHT)) {
background(255, 255, 255, 0);
oldx = int(random(800));
oldy = int(random(600));
}
strokeWeight(stroke_weight);
strokeJoin(ROUND);
stroke(mouseX, mouseY, r, 180);
line(oldx, oldy, mouseX, mouseY);
oldx = mouseX;
oldy = mouseY;
//delay(10);
}
This video is brought to you by the letters W, T and F... http://t.co/Lt4aDTDJ
9 May 2012 - 4:01pmEarthquake! http://t.co/2Aor6dc0 Mapping earthquakes around the world.
9 May 2012 - 3:38pmSpinning kitties http://t.co/b9rJ72cV #css3 #transforms and #transitions
4 May 2012 - 8:50amFrom a couple of weeks ago: Drawing! On your mobile phone! http://t.co/2OATYXFn
3 May 2012 - 11:57pmFrom a couple of weeks ago: Drawing with Canvas http://t.co/nhfl0zW5
3 May 2012 - 11:56pm8 Bit Pwny Club by @TheWeebl http://t.co/Nqm18UgV
5 Apr 2012 - 12:52pmUsing a fancy @leafletjs map on the about page http://t.co/oTCs8yfE
5 Apr 2012 - 12:45pmOMG GODZILLA IS STOMPING ON BRISTOL CITY CENTRE WHAT IS THIS I DON'T EVEN http://t.co/YVt4Bcvu
22 Dec 2011 - 11:24pmLovely Totoro posters http://t.co/E0HKCamI via @flaming_heck
20 Dec 2011 - 10:43pmA #processing experiment: draw some lines http://t.co/9EYzQlRN
7 Dec 2011 - 11:21am