xxxxxxxxxx
22
let num = 12;
let w = 20;
let h = 20;
function setup() {
createCanvas(400, 400);
frameRate(10);
rectMode(CENTER);
}
function draw() {
background(random(0,40));
// do this 10 times
for (let y = h; y < height ; y = y + height/num) {
for (let x = w; x < width; x = x + width/num) {
fill(0,175,255,random(255));
ellipse(x, y, w, h);
}
}
}