xxxxxxxxxx
//This "setup" function is called once, at start
function setup() {
createCanvas(600, 600); // width and height, in pixels
noLoop(); // This says: only call draw() once, please!
}
// We put our drawing commands in this "draw" function.
// It will be called automatically.
function draw() {
background("pink");
drawRings (300, 300)
}
function drawRings(centreX, centreY) {
let diameter = 500;
while (diameter > 0) {
// setRandomStrokeColour();
stroke("purple")
strokeWeight(random(3, 29))
circle(centreX, centreY, diameter);// refering to the parameter of the function on line 17
//Give diameter a new, smaller value (an "assignment operation")
diameter = diameter - 40;
}
noFill(); // Says: Don't colour in the the next shapes, please.
// Says: Outline the next shapes in black, please!
}