32 lines
630 B
Plaintext
32 lines
630 B
Plaintext
int numCurves = 50;
|
|
|
|
float tt = 50; // change with time
|
|
|
|
void setup() {
|
|
//size(800, 600);
|
|
fullScreen();
|
|
noFill();
|
|
strokeWeight(2);
|
|
stroke(255);
|
|
noCursor();
|
|
}
|
|
|
|
void draw() {
|
|
background(0);
|
|
float ty = 100; // change with vertical position
|
|
for (int i = 0; i < numCurves; i++) {
|
|
float tx = 0; // change with horizontal position
|
|
beginShape();
|
|
float alpha = map(i, 0, numCurves, 50, 255);
|
|
stroke(255, alpha);
|
|
for (int x = 0; x < width -1; x+=10) {
|
|
float y = i*20 + noise(tx, ty, tt) * 400 - 50;
|
|
vertex(x, y);
|
|
tx += 0.02;
|
|
}
|
|
endShape();
|
|
ty += 0.05;
|
|
}
|
|
tt += 0.001;
|
|
}
|