One of my old sketches
float x1,y1,x2,y2,x3,y3,x4,y4;
float MODIFIER;
boolean recording = false;
void keyPressed() {
if ( key == 'r' || key == 'R') {
recording = !recording;
}
}
void setup() {
size( 1000, 1000 );
smooth();
noFill();
background( 255, 255, 255, 100 );
strokeWeight( 0.1 );
x1 = 0;
y1 = 10;
x2 = 470;
y2 = 90;
x3 = 600;
y3 = 7;
x4 = 1000;
y4 = 30;
MODIFIER = 1000;
}
void draw () {
float t = frameCount / 100.0;
for ( int i = 1; i < 3; i++ ) {
bezier( x1, y1 , noise( 2 , i, t )* MODIFIER, noise( 3 , i, t )*MODIFIER, noise( 4 , i, t )* MODIFIER, noise( 5 , i, t )* MODIFIER, x4, y4 );
y1+=0.5;
y2+=1.5;
y3+=1.5;
y4+=0.5;
stroke( 25, 25, 25 );
}
if ( recording ) {
saveFrame("output/bezier_####.png");
} else {
}
}
Video output: