line floaw
@author
float STEP = 20;
void setup(){
size(640, 640);
noFill();
}
void draw(){
background(39, 26, 32);
for(float d = 0; d <= width * 2; d += STEP){
float diff = map(sin((d) * 0.03 - frameCount * 0.1), -1, 1, -STEP / 2, STEP / 2);
float rate = map(abs(sin((d) * 0.03 - frameCount * 0.1)), 0, 1, 0, 1);
stroke(lerpColor(color(170, 133, 70), color(102, 136, 158), rate));
strokeWeight(2);
beginShape();
for(float x = d + STEP; x >= -STEP; x -= 5){
float y = d - x + diff;
vertex(x, y);
}
endShape();
}
}