xxxxxxxxxx
32
let margin;
function setup() {
createCanvas(windowWidth, windowHeight);
noStroke();
fill('#fffff1');
margin = height/10
}
function draw() {
background(0);
let numCircles = 20;
let radius = margin;
let spacing = TWO_PI / numCircles;
translate(width / 2, height / 2);
for (let i = 0; i < numCircles; i++) {
let offset = i/10;
let wave = tan(radians(frameCount) + offset);
let angle = i * spacing;
let x = (radius + wave) * cos(angle);
let y = (radius + wave) * sin(angle);
circle(x, y, margin/5);
}
// if(frameCount == 1) saveGif('polarTan', 3)
}