// created in Processing 0124 Beta // http://www.processing.org/ // // by Jeffrey Melton, jmelton@nofi.org // visit http://www.nofi.org/ for more info // // Draws random vertical color lines before saving to a jpeg, clearing and looping // Saves image sequence while mousePressed // Load the images as a sequence into Quicktime Player or your favorite motion graphics app void setup() { size(360, 240); // window resolution frameRate(15); // affects display speed, but saveFrame makes this lag println("Click and hold mouse to save image sequence. Click any key to quit."); } void draw() { background(0); // clear screen for(int i=0; i<5; i=i+1) { // number of lines per frame vline(); //draw line } if (mousePressed == true) { saveFrame("lines-####.jpg"); } } void vline() { // draws a random vertical line float x = random(width); // limit x to width of screen stroke(random(255), random(255), random(255), random(255)); // random values for (R, G, B, alpha) strokeWeight(random(50)); // higher number for potentially thicker lines line(x, 0, x, height); } void keyPressed() { // quit on key click exit(); }