xxxxxxxxxx
23
function setup() {
createCanvas(400, 400);
noLoop();
}
function draw() {
background(255);
let step = 20;
for (let y = 0; y < height; y += step) {
for (let x = 0; x < width; x += step) {
if (random() < 0.5) {
line(x, y, x + step, y);
} else {
line(x, y, x, y + step);
}
}
}
}