“The Kiss Precise” by Frederick Soddy
Four circles to the kissing come The smaller are the benter. The bend is just the inverse of The distance from the center. Though their intrigue left Euclid dumb, There’s now no need for rule of thumb. Since zero bend’s a dead straight line, And concave bends have minus sign, The sum of the squares of all four bends Is half the square of their sum.
This repo contains code to render the Apollonian gasket. The Apollonian gasket is a special kind of circle packing where you start with a big circle and then fit smaller circles inside it, each touching the big circle and each other.
Descartes' formula is a mathematical formula that helps us understand the relationships between circles when they're packed together like in the Apollonian gasket.
Here's the idea: for any three circles that are mutually tangent (meaning they touch each other externally), there's a neat formula that relates the curvatures (or how "bendy" they are) of these circles. The formula is:
Here,
Now, in the Apollonian gasket, we start with three circles inside a larger circle. These circles are tangent to each other and the big circle. Using Descartes' theorem, we can find the curvatures of these circles and use them to find the curvatures of the smaller circles we pack inside them, and so on.
The cool thing about this theorem is that it applies not just to three circles but to any number of circles that are all tangent to each other. So as we keep adding smaller circles into the gaps, we can keep using Descartes' theorem to understand how they all fit together. It's named after the ancient Greek mathematician Apollonius, who was really good at studying shapes and curves.
The code for most of the versions is adapted from Daniel Shiffman's Apollonian Coding Challenge.
The code for the nested version is from Richard Bourne (I have updated the syntax a little bit.) The python and circle inversion code sets actual pixels, so it can't be adapted like Daniel's code. The python code is from user FB36 posted in ActiveStateCode. I obtained the circle inversion code by posting the python code in ChatGPT3.5 and asking it to port to p5.js. It did a pretty decent job--I only had to modify the loop slightly.
- Apollonian circle packings: Dynamics and Number theory
- Apollonian Gasket
- Apollonian Gasket
- A Tisket, a Tasket, an Apollonian Gasket
- A Visual Solution to the Apollonian Problem
- Circle Packing Explorations
- Circle patterns in Gothic architecture
- Descartes Circle Theorem, Steiner Porism, and Spherical Designs
- Geometry Unbound
- Single Line Apollonian Gaskets: Is The Limit a Space Filling Fractal Curve?
- Single Line Apollonian Gaskets for Fashion
- Soddy Circles
- Steiner Chains
- Mathworld reference on Steiner Chains
- The Apollonian Gasket
- Vieta formula
Processing code examples https://openprocessing.org/browse/?time=anytime&type=all&q=apollonian# https://openprocessing.org/sketch/1878906 Processing
Github Apollonian
https://tex.stackexchange.com/questions/539896/another-way-to-draw-steiners-chain