Inspired by Sasj Geometric Animations 160308. Click "View Source" to see the processing code.
float T = 0;
void setup() { size(512,512); frameRate(25); }
void draw() { background(0); stroke(128); strokeWeight(7);
pushMatrix();
translate(256,256);
T -= 0.04;
boolean cycle = false;
for(float x = -128, phase = 0 ; x <= 128 ; x += 32, phase += PI/3, cycle = !cycle)
{
for(float y = -160, t = T; y <= 160 ; y += 16, t += PI/12)
{
float w = cycle
? 20 * sin(-t + phase)
: 20 * sin(t - phase);
stroke(cycle ? 128 : 64);
line(
x - w, y + (cycle ? 8 : 0),
x + w, y + (cycle ? 8 : 0)
);
}
}
popMatrix();
}
Last update:
November 8, 2020