float s = 0; float c = 0; float xoff = 0.0; float yoff = 0.0; float x2off = 0.0; float y2off = 0.0; float x3off = 0.0; float y3off = 0.0; float blue = 0.0; int frameadvance = 0; int nth = 0; int movieframes; void setup() { size(1280, 720); background(0); frameRate(25); } void draw() { strokeWeight((sin(s)+1)*1.1+0.5); // line width variation //stroke(0); blue = (sin(c)+1.2)*80-25; stroke(285-blue,noise(xoff)*255, noise(yoff)*255, 40); //r,g,b,a noFill(); /* curveVertex(noise(xoff) *width, noise(c) *width); curveVertex(xoff, noise(c)*width); curveVertex(noise(xoff) *width, noise(s) *width); curveVertex(xoff, noise(s+c)*width); curveVertex(s*50, noise(xoff) *width); curveVertex(c*50, noise(xoff) *width); */ bezier(noise(xoff)*width*2, noise(yoff)*height*2, noise(s)*width*2, noise(c)*height*2, noise(x2off)*width, noise(y2off)*height, noise(x3off)*width, noise(y3off)*height); // bezier(x1, y1, x2, y2, x3, y3, x4, y4) xoff +=0.001; //first andchor point yoff +=0.002; s +=0.003; //first control point and line width c +=0.005; //first control point and line color x2off +=0.005; //2nd control point y2off +=0.006; x3off +=0.005; // end anchor point y3off +=0.004; nth = 2; // save only every nth frame movieframes = 20; // how many still images to save if(frameCount <= movieframes*nth && frameCount %nth ==0) { saveFrame("/Volumes/SiiSooGate/testi" + frameadvance +".PNG"); frameadvance++; } else if(frameadvance >= movieframes) { print("finished"); } }