xxxxxxxxxx
27
var b = 3; // border width
var r = 25; // set the radius
var d = 2*r;
var x = r+b;
var y = r+b;
function setup() {
createCanvas(windowWidth, windowHeight);
background('white');
strokeWeight(b);
}
function draw() {
stroke(random(255),random(255),random(255));
fill(random(255),random(255),random(255));
ellipse(x,y,d,d);
x += d+b
if (x > windowWidth) {
y += d+b;
x = r+b;
}
if (y > windowHeight) {
x = r+b;
y = r+b;
}
}