Triangle packing — Fantastic Fractal Explorer

Triangle packing

Three circles touch one another. Each pair has a straight line that touches both circles on the side where the third circle is, and these three lines make a triangle around the circles. Each circle sits in one corner of it, touching the two sides that meet there.

Then the triangle is filled. Wherever three things touch one another and leave a gap with curved sides (three circles, or two circles and a side), one circle fits in the gap touching all three. It leaves three smaller gaps, and each of those is filled the same way, without end, as in the Apollonian gasket. Along a side the gaps are those of the gasket on a line.

Each corner holds a chain of circles running into the vertex. Beyond the circle in the corner, a smaller circle touches the same two sides and that circle, then a smaller one, and so on. Each is the one before shrunk towards the vertex by the same factor,

for the angle at the corner, so a sharp corner holds a long chain of slowly shrinking circles and a wide one a short chain of fast shrinking ones. Each pair of neighbors in the chain leaves a gap against each side, filled like the others. The circles never overlap, and the triangle is never crossed.

Drag the three centers. The radii make the circles touch, and the triangle and the packing follow. A drag stops where two sides would turn parallel and the triangle would open up.

Colors

The colors follow the same rule as the Apollonian gasket. The sides have the value 0, the three circles , and 1. Each new circle gets the average of the three it touches, weighted by curvature to the power , times the ratio ; a circle of a corner's chain touches the circle before it and the two sides. A side has curvature 0, so at it does not count at all, and the colors step along each chain as they do down the gaps.