void setup() {
size(600,600);
}
void draw() {
background(20);
rotate(PI/2);
for (int i = 0; i < 1; i++) {
for (int j = 0; j < 50; j++) {
pushMatrix();
//rotate(PI/2);
//rotate(PI/5);
//translate(width/2, height/2);
translate(300- i * 120, -170-j * 6);
float ratio = (20*i + j)/49.0;
float angle = sin(millis() / 800.0 + ratio * (PI/2)) * PI/2;
float a =150*cos(angle);
rotate(angle/50);
strokeWeight(1);
stroke(#EA1A3E);
noFill();
rectMode(CENTER);
rotate(PI/4);
rect(0, 0, 1.2*a, 1.2*a);
noStroke();
fill(#EA1A3E,30);
ellipse(0, 0, 1.2*a, 1.2*a);
popMatrix();
}
}
}