Saturday, March 7, 2026

Inversive Substitution Rules

A substitution rule assigns a colour to each self-similar region in a shape, where each colour has its own rule set. It produces a recursive shape which, much like an L-system, generates more complex shapes than simple recursive fractals.

A simple example is the Menger carpet. There are two colours of square, white and black. The rules are:

white: split into 3x3 grid such that centre is black and the rest are white.

black: stay black.

Of course you can get more complicated, for instance you could have four types, labelled white, red, green and black, starting with white:

white → alternating white and red with central black

red → alternating white and red with central green

green → all green

black → all black


Anyway, I'm interested in such substitution rules but for inversive limit sets. 

The idea with these limit sets is that the symmetries are inversions around spheres that connect at dihedral angles that are pi/n for integer n. 

In all cases I have seen of these inversive limit sets there is just a single set of spheres, so generating a simple recursive structure. 

In order to generate more complex shapes we can use substitution rules to mix in different types of inversive set at different locations. 

The key constraint is that when you substitute in a different set of spheres, it must connect identically to its neighbours after some Mobius transformation. 

Here's an example with two colours:

green: a set of 6 (green) spheres that generates a tree structure (left hand side below)

red: a set of 6 spheres that generates a shell structure (concavities). These are all red apart from one green sphere 


So the tree structure is a fractal tree all the way down, but the red shell structure has green protuberences inside each dome. This can only work if there is a Mobius transformation of the green sphere inside the res sphere set, which makes its neighbours match the neighbours of the destination green sphere.

We prescribe this structure by taking the connectivity diagram of the shell structure (left) and making one of the nodes substitute into a node in the tree connectivity structure (right):



The next example uses five generalised spheres to make a cubic-symmetry shell. Ignore the little balls which are a temporary rendering artefact:
We can make a similar structure but with a sphere protruding more to be tree-like in shape:
Now, if we substitute the intruding sphere in the first inversive limit set into the protruding sphere in the second one then we get a mixture of concave and conves:
We can also do it the other way around, substituting in the concave shell onto the second limit set:
again, ignoring the little ball rendering artefacts.


We can do multi-set combinations too. Here is a tree set:
a shell set (red) linking to the tree set
and a ball set (blue) linking to the above shell set:
here it is from another angle:
In each link I linked a single sphere of the set to the child set, as shown here:

For some reason 3-way doesn't work if you use the same sphere id in both links. 
The above spheres were all in line. Here the 3-way link are in two orthogonal directions:
shell->tree:
ball->shell->tree:


Here the two opposite spheres of the 6-sphere blue 'ball' set both link. The left side links to the shell that links to the tree, and the right side links to just the tree. You can just see the remaining blue as a line down the middle:


Here is a 4-way rule, with two levels of 6-sphere balls before linking to a shell then a tree:

This is useful for making something like a planet or moon. You can start with fairly spherical structures, then include the more intricate (e.g. tree) geometry at the smaller scales. But the tree areas aren't just in one location, they are clustered in a fractal set of patches, which I think is nice.


OK, here's a slightly more refined example. We start with an almost spherical limit set, which makes a nice basic planet surface (ignore the two little holes, I'm only using 15 iterations):
We will combine this with a shell-shell for craters:
and then a cluster-tree for some sort of weird alien vegetation:
We make the shell-shell link to the cluster-tree on one of its spheres:
and then the spherical world link to this 'greenery-filled' shell-shell on one of its 6 spheres:

Now modifying a whole 6th is a bit extreme for a large world, so I've added the ability to direct the link to the next set to occur not only on one of the current set's spheres, but also on one of its child spheres or grandchild spheres, or any descendant sphere. Here it applies it to one child sphere (so 1/36th of the world):
For only a single link the deeper the descendent that does the link, the smaller the part of the wold it effects. This is a grandchild (so a 216th of the world):

The greenery-filled shell-shell occupies more than a 216th in the final limit set because you don't see just the descendent sphere but the reflections of that sphere over the other parts of the world. 

So this is different to traditional world building, you can specify a location for a patch of terrain by specifying the descendent, but you get a distribution of the structure, not just a single one. This is actually quite nice and natural, many things like forests, water bodies and mountains come in distributions rather than just single items.
 




No comments:

Post a Comment