xxxxxxxxxx
75
function setup() {
createCanvas(400, 400);
}
function draw() {
// background(220);
// noStroke();
let size = width * 0.0625;
// for (let x = 0; x <= width; x += 15) {
// for (let y = 0; y <= height; y += 15) {
for (let o1 = size; o1 <= width - size; o1 += size * 2) {
for (let o2 = size; o2 <= height - size; o2 += size * 2) {
translate(o1, o2);
push();
rectMode(CENTER);
translate(o1, o2);
// rotate(frameCount * 0.03);
rect(0, 0, size, size);
pop();
// rect(0, 0, size, size);
// if ((x+y) % 10 == 0) {
// fill(0);
// // noFill();
// if (y % 13 ==0){
// fill(255);
// } else {
// fill(0);
// }
// // fill (255);
// // stroke(255);
// } else {
// noFill();
// // fill(255);
// // noStroke();
// // fill(0);
// }
// if (x)
// if (x % 5 == 0) {
// translate(2,0);
// } else {
// noFill();
// }
// let s = random(20, 100);
// triangle(x, y+ 20, x +10 , y+10, x +10, y+30);
// noLoop();
}
}
}
// function setup() {
// createCanvas(400, 400);
// }
// function draw() {
// background(220);
// let size = width * 0.0625;
// for (let o1 = size; o1 <= width - size; o1 += size * 2) {
// for (let o2 = size; o2 <= height - size; o2 += size * 2) {
// push();
// rectMode(CENTER);
// translate(o1, o2);
// // rotate(frameCount * 0.03);
// rect(0, 0, size, size);
// pop();
// }
// }
// }