xxxxxxxxxx
21
function setup() {
createCanvas(400, 200);
}
function draw() {
background("lightgray");
fill("white");
stroke("black");
strokeWeight(3);
//In circx, the first number 50 is the starting point, and every next numbered circle, it multiples by 50, so it'll be i = 0 is at 50, i = 1 at 100, i = 2 is at 150 and so on until i = 6 ends it
// In circy, that declaration makes the circles at half the height of the canvas no matter the canvas size.
for (let i = 0; i < 7; i++) {
let circx = 50 + i * 50;
let circy = height / 2;
let circd = 40;
circle(circx, circy, circd);
}
}