const palette = ["#ACDEED55", "#EAD5E855", "#84C0E755", "#38439955"];
createCanvas(windowWidth, windowHeight);
maxR = max(width, height) * 0.45;
let R = map(noise(nt * 0.01, nR), 0, 1, 0, maxR);
let t = map(noise(nt * 0.001, nTheta), 0, 1, -360, 360);
let x = R * cos(t) + width / 2;
let y = R * sin(t) + height / 2;
objs.push(new Obj(x, y));
objs.push(new Obj(mouseX, mouseY));
for (let i = 0; i < objs.length; i++) {
for (let j = objs.length - 1; j >= 0; j--) {
if (objs[j].isFinished()) {
this.vel = createVector(0, 0);
this.pos = createVector(ox, oy);
this.t = random(0, noiseScale);
this.lifeMax = random(20, 50);
this.life = this.lifeMax;
this.step = random(0.1, 0.5);
this.dMax = random(10) >= 5 ? 10 : 30;
this.c = color(random(palette));
let theta = map(noise(this.pos.x * noiseScale, this.pos.y * noiseScale, this.t), 0, 1, -360, 360);
this.d = map(this.life, 0, this.lifeMax, 0, this.dMax);
circle(this.pos.x, this.pos.y, this.d);
let b = acos(cos(num * t));
let B = cos(a - b / num);