xxxxxxxxxx
29
function setup() {
createCanvas(690, 1000);
background(240);
rows = 22;
cols = 12;
startx = 50;
starty = 50;
boxdim = 40;
variation = -2;
offset = 0;
noFill();
for (row = 0; row < rows; row++) {
variation += 2;
offset += 1;
for (col = 0; col < cols; col++) {
push();
rectMode(CENTER);
translate(startx + col*boxdim, starty + row*boxdim);
rotate(radians(random(-1*variation, variation)));
rect(0 + random(0, offset), 0 + random(0, offset), boxdim, boxdim);
pop();
}
}
}
function draw() {
}