xxxxxxxxxx
29
function setup() {
createCanvas(windowWidth, windowHeight);
initialize();
}
function initialize() {
background(0);
noFill();
stroke(255);
strokeWeight(2);
let diameter = min(width, height);
drawCircle(width / 2, height / 2, diameter);
}
function drawCircle(x, y, d) {
circle(x, y, d);
let new_d = d / 2;
if (new_d >= 4) {
drawCircle(x, y, new_d);
}
}
function windowResized() {
resizeCanvas(windowWidth, windowHeight);
initialize();
}