### Trypophobia trigger ðŸ§¿

```const rMin = 2; //min=1 max=5 step=.5
const rMax = 7; //min=5 max=10 step=.5
const bigR = 70; //min=40 max=90 step=5

// You can find the Turtle API reference here: https://turtletoy.net/syntax
Canvas.setpenopacity(-1);

// Global code will be evaluated once.
const turtle = new Turtle();
const polygons = new Polygons();

const circles = [];

// The walk function will be called until it returns false.
function walk(i) {
if(i == 0) {
//set up outer rim of circles
let startA = Math.random() * 2 * Math.PI;
for(let j = 0; j < Math.PI * 2;) {
let r = rMin + (Math.random() * (rMax - rMin));
let dJ = (r / bigR);
let a = startA + j + dJ;

if(circles.length > 0) {
let realR = .1;
while(!intersects(a, realR, bigR)) {
realR += .1;
}
r = realR - .1;
}
circles.push(new Circle([Math.cos(a) * bigR, Math.sin(a) * bigR], r, a));
j += dJ * 2;
}

//remove last circle added and add a new one to fill the potential gap created by randomly filling outer rim
circles.pop();
let a = (startA + (circles[circles.length - 1].a + (circles[circles.length - 1].radius / bigR)) + (2 * Math.PI)) / 2;
let realR = .1;
while(!intersects(a, realR, bigR)) { realR += .1; }
r = Math.max(rMin, realR - .1);
let d = bigR;
while(intersects(a, r, d)) { d -= .1; }
circles.push(new Circle([Math.cos(a) * d, Math.sin(a) * d], r, a));

//fill the circle with random circles
for(let j = 0; j < 20000; j++) {
let a = Math.random() * 2 * Math.PI;
let r = rMin + (Math.random() * (rMax - rMin));

let d = getDistance(a, r);
if(d + r < bigR) {
circles.push(new Circle([Math.cos(a) * d, Math.sin(a) * d], r, a));
}
}

//randomize drawing order
circles.sort((a,b) => Math.random()-.5);
}

//draw the circles
if(circles.length > 0) {
let c = circles.pop();
c.draw(turtle);
return true;
}

//and finally draw the background
let p = polygons.create();
addCirclePoints(p, [0,0], bigR, 0, 2 * Math.PI, 40);
polygons.draw(turtle, p);
return false;
}

function getDistance(a, r) {
let d = 0;
while(d + r < bigR && intersects(a, r, d)) {
d+=.1;
}
return d;
}

function intersects(a, r, d) {
for(let i = 0; i < circles.length; i++) {
let x = Math.cos(a) * d;
let y = Math.sin(a) * d;
let distanceSquared = Math.pow(circles[i].position[0] - x, 2) + Math.pow(circles[i].position[1] - y, 2);
let requiredDistanceSquared = Math.pow(circles[i].radius + r, 2);
if(distanceSquared < requiredDistanceSquared) {
return true;
}
}
return false;
}
const add = (a, b) => [a[0]+b[0], a[1]+b[1]];
class Circle {
this.position = position;
this.a = a;
}
draw(turtle) {
for(let i = 0; i < cs.length; i++) {
let p = polygons.create();
addCirclePoints(p, this.position, cs[i], 0, 2 * Math.PI);
if(i % 2 == 1) {
}
polygons.draw(turtle, p);
}
}
}
function addCirclePoints(p, position, r, s, e, f = 40) {
for (let i=0; i<=f; i++) {