Home▸Articles▸Generative Art & Algorithmic Patterns

Apollonius Gasket — Fractal Circle Packing

A beautiful and intricate pattern that emerges from the recursive application of Descartes' Circle Theorem.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What is an Apollonian Gasket?

An Apollonian gasket is a fractal pattern that arises from the process of packing circles within circles. Starting with three mutually tangent circles, new circles are recursively added to fill the gaps between them, creating a complex and self-similar structure.

This pattern was first studied by ancient Greek mathematician Apollonius of Perga, but it gained renewed interest in modern times due to its fractal properties and connections to number theory.

Descartes' Circle Theorem

The key mathematical principle behind the Apollonian gasket is Descartes' Circle Theorem, which provides a relationship between the curvatures (reciprocals of radii) of four mutually tangent circles. If k1, k2, and k3 are the curvatures of three mutually tangent circles, then the curvature k4 of any fourth circle that is also tangent to these three can be determined using the formula: (k1 + k2 + k3 + k4)^2 = 2(k1^2 + k2^2 + k3^2 + k4^2).

This theorem allows for the precise calculation of new circles' curvatures, ensuring that they are tangent to their neighbors and filling in the gaps between existing circles.

live demo · related simulation● LIVE

Properties and Applications

The Apollonian gasket exhibits self-similarity at different scales, making it a fascinating object of study in fractal geometry. Its intricate structure has applications in various fields, including computer graphics, where it can be used to create complex patterns for visual effects.

Moreover, the Apollonian gasket is connected to number theory through its relationship with integer curvatures and the distribution of prime numbers.

Real-World Examples

The Apollonian gasket has found applications in various real-world scenarios. For instance, it can be used to design efficient packing arrangements for circular objects, such as in the layout of pipes or gears.

In addition, its self-similar structure makes it a useful model for understanding natural phenomena like the distribution of pores in certain materials.

Frequently asked questions

How does Descartes' Circle Theorem work?

Descartes' Circle Theorem relates the curvatures (reciprocals of radii) of four mutually tangent circles through a quadratic equation, allowing for the calculation of new circle curvatures that fit within existing gaps.

What are some practical applications of Apollonian gaskets?

Apollonian gaskets can be used in computer graphics to create complex patterns and in engineering for efficient packing arrangements, such as the layout of pipes or gears.

Can the Apollonian gasket be generalized to other shapes besides circles?

While the classic Apollonian gasket is based on circles, similar fractal structures can be created using other shapes, though they may not exhibit the same level of symmetry and self-similarity.

How does the Apollonian gasket relate to number theory?

The curvatures in an Apollonian gasket often involve integer values, leading to connections with number theory. The distribution of prime numbers can be studied through these integer curvatures.

Try it live

Everything above runs in your browser — open Apollonius Gasket — Fractal Circle Packing and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Apollonius Gasket — Fractal Circle Packing simulation

What did you find?

Add reproduction steps (optional)