/* A little Processing Play Program A loop of calls to "Squiggle" Line Making Function AND some user interactivity with the function! :) Glenn Zucman Rosemead, California Tuesday 24 June 08 */ /** * To start: click in the image window and press an arrow key.

* Use the Arrow Keys:
* UP: More Plumes
* DOWN: Less Plumes
* LEFT: Plume Faster
* RIGHT: Plume Slower
*
* Move the Mouse Around the Image Window:
* RIGHT-LEFT to decrease or increase the number of points
* UP increase the amount of squiggleness a little
* DOWN increase the amount of squiggleness a lot
*
* Created 24 June 2008 */ void setup(){ //Window / Color size (800,600); background (255); } //Initializing Variables int points=10000; int lines=20; float spraySpread=0.002; float squiggleness=0; //Arrow Key Press Detection void draw(){} void keyPressed(){ if (keyCode == UP) { lines++; println(lines); } else if (keyCode == DOWN){ lines--; println(lines); } else if (keyCode == LEFT){ spraySpread = spraySpread + 0.0002; println(spraySpread); } else if (keyCode == RIGHT){ spraySpread = spraySpread - 0.0002; println(spraySpread); } //Calling Spray background (255); for (int j=1; j 400){ squiggleness = 10*(mouseY-400)/200; } else { squiggleness = 0; } println(squiggleness); //Calling Spray background (255); for (int j=1; j