/****************************************************************** * The following code will save all the frames. * * Make sure you stop looping after a certain number of * * frames so as not to run out of your hard drive storage. * * To make a movie, go to Tools -> Movie Maker. * ******************************************************************/ int c = 255; void setup() { size(400, 400); background(0); frameRate(2); noStroke(); } void draw() { fill(c, random(100)); float sz = random(30,200); ellipse(random(width), random(height), sz, sz); if(frameCount % 20 == 0) { c = 255 - c; // 255 0 255 0 255 0 .. } saveFrame("frames/####.png"); if(frameCount > 120) { // 60 seconds * 2 fps = 120 noLoop(); } }