#sphereinversion

2025-09-24

With 2D Apollonian gaskets, it's easy to build arbitrary initial configurations. Simply picking 3 random points means you have to solve for 3 radii to make a kissing setup. Since there are exactly 3 distances between the points, this makes a basic linear system. But not so in 3D: you have 4 points and 4 radii, but 6 different distances, so a linear solution won't cut it. You could start with 3 kissing spheres using the 2D logic, but then you can't put the 4th point just anywhere.

I didn't bother with the messy quadratic system, because there's an easier way: take the symmetric tetrahedral config and deform it using an inversion. Yep, the same tool that's already the bread and butter of gasket-weaving. What's more, we can build the symmetric gasket first and then deform the whole thing. Inversion preserves spheres as spheres and maintains their kissing relations, it doesn't care how many there are.

In other words, the order doesn't matter with inversions. I've used this trick years ago in some 2D inversion demos to simplify things, and this 3D also benefits hugely from it. Besides the problem of initial config, 3D gaskets also have a speed issue due to deduplication (explained in an earlier post). The inversions are very fast as they can be parallelized, and this also applies to the deformations. So it's nice that we need not rebuild the gasket again for every config, we can just deform the same thing again.

#apollonianspheres #apolloniangasket #gasketweaving #iteratedfunctionsystem #inversion #sphereinversion #geometricart #3dgraphics #digitalsculpture #pythoncode #opengl #algorithmicart #algorist #mathart #laskutaide #ittaide #kuavataide #iterati

2025-09-18

Taking my lastest Apollonian gasket code from 2D to 3D was quite straightforward in principle, though there were a few kinks in the road. A particular difference between 2D and 3D gaskets is that in 3D, the inversion spheres overlap, which can create duplicate spheres.

Viewing detailed 3D structures isn't trivial either. We can only really see in 2D, as one dimension is taken up by the ray of light. Looking from outside, I wouldn't guess this blob contains over 10k spheres, so I blew it up for this clip.

The sheer amount of balls is also heavy on the drawing side, so I used my low-poly "sprites" where each ball is drawn by a geometry shader from a single input point. The low-poly aspect is quite clear in the largest spheres, but I think it's OK for this math demo.

#apollonianspheres #apolloniangasket #iteratedfunctionsystem #inversion #sphereinversion #geometricart #3dgraphics #digitalsculpture #pythoncode #opengl #geometryshader #algorithmicart #algorist #mathart #laskutaide #ittaide #kuavataide #iterati

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst