xxxxxxxxxx
29
/*
Inspired by Vera Molnár's Du Cycle: “Carrés Non-Concentriques” (1974)
*/
let i;
function setup() {
createCanvas(windowWidth, windowHeight);
frameRate(6);
background(0);
rectMode(CENTER);
noFill();
stroke(255);
strokeWeight(2);
i = 1;
}
function draw() {
background(0,50);
let minSize = min(width, height);
let amount = minSize / 30;
let x = random(width / 2 - amount, width / 2 + amount);
let y = random(height / 2 - amount, height / 2 + amount);
square(x, y, amount * i);
i++;
}