var i;var c = 100;var f = 50;
function setup() {
createCanvas(640, 480);
}
function draw() {
background("#00cc44");
for (var i = 0; i < 60; i+=1) {
rectMode(CENTER);
noStroke();
fill("#00e64d");
push();
rotate(radians(i));
rect(width/2,height/2,2,2*c);
pop();
push();
rotate(radians(-i));
rect(width/2,height/2,2,2*c);
pop();
push();
rotate((i * radians(frameCount))/f);
rect(width/2,height/2,2,2*c);
pop();
push();
rotate((-i * radians(frameCount))/f);
rect(width/2,height/2,2,2*c);
pop();
fill("#4dff88");
push();
translate(0,2*c);
push();
rotate(radians(i));
rect(width/2,height/2,2,2*c);
pop();
push();
rotate(radians(-i));
rect(width/2,height/2,2,2*c);
pop();
push();
rotate((i * radians(frameCount))/f);
rect(width/2,height/2,2,2*c);
pop();
push();
rotate((-i * radians(frameCount))/f);
rect(width/2,height/2,2,2*c);
pop();
pop();
fill("#4dff88");
push();
translate(0,-2*c);
push();
rotate(radians(i));
rect(width/2,height/2,2,2*c);
pop();
push();
rotate(radians(-i));
rect(width/2,height/2,2,2*c);
pop();
push();
rotate((i * radians(frameCount))/f);
rect(width/2,height/2,2,2*c);
pop();
push();
rotate((-i * radians(frameCount))/f);
rect(width/2,height/2,2,2*c);
pop();
pop();
fill("#1aff66");
push();
translate(0,c);
scale(1,-1);
push();
rotate(radians(i));
rect(width/2,height/2,2,2*c);
pop();
push();
rotate(radians(-i));
rect(width/2,height/2,2,2*c);
pop();
push();
rotate((i * radians(frameCount))/f);
rect(width/2,height/2,2,2*c);
pop();
push();
rotate((-i * radians(frameCount))/f);
rect(width/2,height/2,2,2*c);
pop();
pop();
fill("#1aff66");
push();
translate(0,-c);
scale(1,-1);
push();
rotate(radians(i));
rect(width/2,height/2,2,2*c);
pop();
push();
rotate(radians(-i));
rect(width/2,height/2,2,2*c);
pop();
push();
rotate((i * radians(frameCount))/f);
rect(width/2,height/2,2,2*c);
pop();
push();
rotate((-i * radians(frameCount))/f);
rect(width/2,height/2,2,2*c);
pop();
pop();
}
}