xxxxxxxxxx
32
let x = 10; // spacing between columns
let y = 30; //spacing between rows
//let w = 20; // the width of a circle
let margin = 15; // the margin on the upperleft hand
let numC = 200; // the number of circles
let maxW = 30; // the maximum width of a circle
let maxLilt = 10; // maximum displacement in the x domain
function setup() {
createCanvas(600, 600);
noFill();
noLoop(); // so that draw loop DOES NOT repeat
randomSeed(451);
}
function draw() {
background(255);
for (let j = 0; j < numC;j++) {
for (let i = 0; i < numC; i++) { // writes a row
let w = random(maxW);
let lilt = random(-maxLilt,maxLilt);
circle(lilt+margin + x * i, margin + y * j, w);
}
}
}