function drawCircles([x, y, r], depth, context) {
if (depth === 0) return;
circle([x, y, r], context, { fill: false });
const nextR = r / 3;
const inner = [[x, y, nextR]];
for (let i = 0; i < n; ++i) {
const nextCoords = coordsFromDeg((360 / n) * i, r - nextR, [x, y]);
inner.push([...nextCoords, nextR]);
}
inner.forEach(c => drawCircles(c, depth - 1, context));
}