xxxxxxxxxx
void setup()
{size(500, 500);
}
void draw()
{
background(255);
translate(0,0);
float x= millis()/1000.0;
fill(0);
for(int i=0; i<1; i=10)
{
fill(0);
rect (0, 0, 50, x*200);
rect (100, 0, 50, x*200);
rect (200, 0, 50, x*200);
rect (300, 0, 50, x*200);
rect (400, 0, 50, x*200);
rect (500, 0, 50, x*200);
}
pushMatrix();
translate(0, 300);
for (float a=0; a<500; a+=100)
{
for (float b=0; b<500; b+=100)
{
noStroke();
fill(255);
rect(a, 0, 50, 50);}
}
popMatrix();
pushMatrix();
translate(0, 450);
for (float c=0; c<500; c+=100)
{
for (float d=0; d<500; d+=100)
{
noStroke();
fill(255);
rect(c, 0, 50, 50);}
}
popMatrix();
pushMatrix();
translate(50, 150);
for (float a=0; a<500; a+=100)
{
for (float b=0; b<500; b+=100)
{
noStroke();
fill(0);
rect(a, 0, 50, 50);}
}
popMatrix();
pushMatrix();
translate(50, 0);
for (float c=0; c<500; c+=100)
{
for (float d=0; d<500; d+=100)
{
noStroke();
fill(0);
rect(c, 0, 50, 50);}
}
popMatrix();
}