xxxxxxxxxx
29
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
let size = width * 0.0325;
for (let o1 = size; o1 <= width; o1 += size*.5 ) {
for (let o2 = size; o2 <= height; o2 += size*.5) {
push();
rectMode(CENTER);
translate(o1, o2);
if ((o2+cos(o1)) % 3 == 0){
// rotate(.5);
fill(255);
} else {
// rotate(random(0,1))
fill(0);
}
rect(0, 0, size, size);
pop();
noLoop();
}
}
}