Explore the Apollonian Gasket
Apollonian Gasket: Nesting circles within circles, ad infinitum
Imagine three circles that are tangent to one another. A tiny gap remains in the space between them.
Now, place a fourth circle into this gap so that it is tangent to the surrounding three circles. This creates even more, smaller gaps.
Keep adding new circles—one after another—and the circles become increasingly small and numerous, while the entire pattern grows ever more complex.
If you continue this process, you will discover something truly remarkable: no matter how much you zoom in, there always seem to be new circles nestled between the existing ones. This is the Apollonian gasket.
Starting with Three Circles
You don't actually need complex mathematics to understand Apollonian circle packing.
Let's start with three circles.
Arrange them so they are tangent to one another; a small gap forms in the space enclosed by the three circles. This gap might look ordinary, but now we do something fascinating: place another circle inside that gap so that it touches all three surrounding circles. Now, we have four mutually tangent circles.
Then, the magic begins.
We have four circles now, but if you look closely, new gaps have appeared between them. What do we do? It's simple: keep filling them in.
Place a small circle in a new gap so that it is tangent to the surrounding circles. Then, find another gap and place one there. Find another, place another.
Gap → Place circle → Create more gaps → Place more circles → More and more circles → Continue...
If you only do this a few times, you'll see a very simple pattern. But if you keep repeating the process, the pattern rapidly becomes complex.
Why do these circles fit in so perfectly?
It might sound like a matter of luck, but it actually isn't.
Mathematics tells us: if we know the positions of several mutually tangent circles, we can calculate the exact position and size of another circle that is tangent to all of them.
So, instead of just trying to see if a circle fits in a certain spot, we calculate exactly where the next circle should go and how big it needs to be based on the existing circles. This is the core idea behind Apollonian circle packing.
In essence, it becomes a mathematical game of filling in the blanks.
You can visualize the process as a collection of empty spaces—each one formed by the gaps between existing circles. Our task is to find a gap and slot in a circle that fits perfectly. This new circle then creates new gaps, meaning that every time we add a circle, we generate more spaces to fill. It is like a mathematical filling game that never ends.
The first circles added are already much smaller than the original ones. The next round brings even smaller ones, followed by smaller ones still, and so on. Eventually, you see a vast number of tiny circles packed closely together. But the most fascinating part is that being 'small' doesn't mean the process is over. Even a circle so tiny it is barely visible can still have new gaps around it—gaps where even smaller circles can be placed.
What happens if you zoom in infinitely?
Imagine you see a small circle. Zoom in, and you see more small circles. Zoom in further, and even smaller circles appear. Zoom in again, and new structures still emerge. Like the Mandelbrot set and the Julia set, it evokes a unique feeling: you think you’ve reached the end of the pattern, but zooming in reveals new worlds hidden within. However, the ways they generate infinite detail differ.
The infinite detail of the Mandelbrot set arises from continuous iteration of complex numbers. As you zoom into a region, you see complex boundaries and new structures.
In contrast, the infinite detail of the Apollonian gasket (or Apollonian circle packing) comes from repeatedly filling the spaces between circles with new circles.
One involves computational trajectories, while the other involves recursive packing. So, if the Mandelbrot set is a “world of infinite computation,” then the Apollonian gasket is more like a “world of infinite packing.”
Why is it called 'Apollonius'?
The name comes from the ancient Greek mathematician Apollonius of Perga, a renowned geometer who made significant contributions to the study of conic sections and geometry.
The 'Apollonius' here refers to a classic geometric problem: How do you construct a circle that is tangent to a given set of circles? This is known as the Problem of Apollonius. Apollonian circle packing is based precisely on this geometric relationship of circles being tangent to one another.
What does 'tangent' mean?
You actually see this every day. If two circles touch at exactly one point without intersecting, they are said to be tangent to each other.
The most important rule of Apollonian circle packing is that the circles must be tangent to one another; any new circle added must also be tangent to the surrounding circles. Consequently, the entire pattern you see is actually a highly complex network of touching circles.
It may look complex, but the rules are actually very simple. We need only one basic rule: find a gap and place a circle that is tangent to the surrounding circles. Then, repeat.
There is no painter, no manual design, and no hand-adjusting of individual circles. Yet, the result is a highly intricate pattern. This is the most fascinating aspect of mathematically generated graphics: complex results do not necessarily require complex rules.
A Little More About the Math
If you delve a bit deeper into the math, you'll discover a beautiful pattern here. Mathematicians can use a relationship involving the curvature of circles to quickly calculate new ones.
Curvature can be simply understood as how sharply a circle curves. Circles with large radii have low curvature, while very small circles have high curvature.
So, large circle → low curvature; small circle → high curvature.
In an Apollonian circle packing, there is a beautiful integer relationship between the curvatures of the different circles. This means the entire packing isn't just a matter of drawing circles by intuition, but rather a precise mathematical structure.
For the classic problem of four mutually tangent circles, if you know the curvatures of three circles, you can calculate the curvature of the fourth. This relationship is known as Descartes' Circle Theorem, expressed by the formula: (k1 + k2 + k3 + k4)2 = 2(k12 + k22 + k32 + k42), where k represents the curvature of a circle.
If formulas aren't your thing, you can simply think of it this way: if you know three circles, you can precisely calculate another circle that is tangent to all of them. This is one of the mathematical foundations that allows the entire system to continuously 'automatically fill in' circles.
Why does it look so neat and orderly?
Because the position of each circle is not random; it must satisfy the condition of tangency.
The next circle must also be tangent to the others, and the one after that follows the same rule.
Thus, even as the number of circles grows, the entire pattern remains governed by a single geometric principle. This creates a coexistence of complexity and order—which is precisely what makes the Apollonian gasket so fascinating.
When observing an Apollonian gasket, you will notice that the circles are particularly densely packed in certain areas, with the density increasing as you move toward the edges.
A single circle might be surrounded by numerous smaller ones; look closer, and you will find even tinier circles nestled between those smaller ones. This progression—large circles → small circles → even smaller circles → minuscule circles → approaching infinity—creates a structure of diminishing sizes that gives the entire pattern a profound sense of depth and layering.
It resembles both a geometric figure and a miniature universe
Upon first seeing an Apollonian gasket, many people are reminded of cells, bubbles, planets, the microscopic world, or the architecture of some alien civilization.
Of course, these are merely visual associations. Mathematics itself does not declare, 'I am going to draw a cluster of cells.' It simply executes a continuous process: 'Find a gap and insert a tangent circle.' Yet, when this rule is repeated enough times, the human brain naturally seeks out familiar shapes within these dense structures.
Continue Exploring the World of Infinite Detail
The Apollonian gasket is a gateway to a world of “infinite detail.”
If you enjoy zooming in to discover hidden structures, you might want to explore the Mandelbrot set, Julia set, and Newton fractal. Each generates infinite detail in a unique way: the Mandelbrot and Julia sets arise from complex number iteration, the Newton fractal comes from the process of solving equations, and the Apollonian gasket is formed through the endless recursive packing of circles within circles. Together, they illustrate a fascinating mathematical concept: a simple rule, when repeated indefinitely, can create a world of virtually limitless complexity.
So, why not start with three circles? Then zoom in—and zoom in again—to see where the next circle is hiding.
You can also explore more amazing mathematical patterns or read more about the Problem of Apollonius on Wikipedia.