xxxxxxxxxx
float columns;
float rows;
float rectWidth = 50;
float rectHeight = 50;
float chaos = 0;
void setup()
{
size(500, 1000);
smooth();
strokeWeight(3);
noFill();
columns = width/rectWidth;
rows = height/rectHeight;
frameRate(1);
}
void draw()
{
background(255);
for (int i = 0; i < rows; i++)
{
translate(0,rectHeight/2+i*rectHeight);
for (int j = 0; j < columns; j++)
{
//stroke(random(255),random(255),random(255));
resetMatrix();
translate(rectWidth*j,rectHeight*i);
rotate(3.14/rows*(random(chaos)-chaos/2));
rect (0,0, rectWidth, rectHeight);
}
chaos++;
}
chaos = 0;
noLoop();
}