xxxxxxxxxx
26
let x = 20; // spacing between columns
let y = 10; //spacing between rows
let w = 5; // the width of a circle
let margin = 10; // the margin on the upperleft hand
let numC = 20; // the number of circles
function setup() {
createCanvas(400, 400);
noFill();
noLoop(); // so that draw loop DOES NOT repeat
}
function draw() {
background(255);
for (let j = 0; j < numC;j++) {
for (let i = 0; i < numC; i++) { // writes a row
circle(margin + x * i, margin + y * j, w);
console.log(i + " is the value of i", j + " is the value of j ")
}
}
}