Apollonian gasket — Fantastic Fractal Explorer
Apollonian gasket
Three circles touch each other inside a larger circle, which touches all three. The gaps they leave are filled by circles each touching three others, and the gaps between those by more, without end. The circles all stay outside one another, so the packing is the Apollonian gasket.
Drag the three centers. The radii make them mutually tangent, and the enclosing circle (the unit circle at the start) is the one that touches all three from inside. The iterations slider sets how many generations are searched, so deeper levels show as it rises.
Colors
Every circle carries a number. The enclosing circle has 0 and the three base circles have , and 1. A new circle touches three older ones; its number is their average, each weighted by its curvature (one over the radius) to the power , times the color ratio :
The color is on the palette, where is the color scale, wrapped round when it passes 1.
At the smallest neighbor counts most, and that is the circle made just before. So the factor compounds down every chain of circles, like a geometric sequence , and a chain running into a cusp steps through the palette. At the large old circles count most and the colors stay near theirs; at all three count equally.