Saturday, June 27, 2026

Substitution multi-sets

The ability to substitute in a child inversive limit set allows an interesting feature to be implemented in the substitution limit sets algorithm. We can have two spheres that overlap with a non-integer order.

This allows for instance the branches of a tree to pass nearby to each other, where they normally would either connect in a sponge structure or just touch tips. Instead they ignore each other and pass close-by.

We do this by assigning a special order flag (-2) to edges. Noting that 0 means the spheres must be separated and -1 means they contact on their edge. With this flag, two spheres are not constrained relative to each other. In order to deal with this non-group structure a separate rendering thread is kicked off for each -2 connection between spheres that both overlap the point. These each estimate distance in the usual way and the minimum distance is used, representing a union of the multiple iteration paths.

Here is a limit set where the two coloured spheres intersect at a non-integer order (order = pi / dihedral angle):


If we render the limit set normally it has some degree of discontinuities due to the non-integer order:


If however we give the two coloured spheres a parallel connection (-2) then you can see that it adds a lot more geometry:
But these sort of limit sets have a lot of overlap.

What we can do instead is make the two parallel spheres substitute in child sets where each child set lacks the opposite sphere:

If we were to render this without the parallel threads (the standard render) then as you see it creates discontinuities due to the substituting spheres overlapping (I'm not adding an overlap limit set here either):
But if we put the parallel rendering code back in then we get a valid limit set:

One of the key features of this method is that the set can include branches that interlock or thread around each other without the usual behaviour where they just meet at the tips into a sponge. This can be seen between the green and blue tree-cluster-tree geometry on the left hand side. 

You can see that the limbs get near each other and enter each others' space. This is not possible with standard limit sets or substitution sets, it allows parts of a limit set to effectively ignore other parts, which it good for making more elaborate tree-like structures, rather than just recursive domes. Because there is no constraint on the angle between the two coloured spheres, they are free to be animated continuously. If can of course cause overlapping geometry if the spheres overlap too far. 

The above was a tree-cluster-tree, since it is a tree cluster-tree (a cluster-tree made of trees, which means trees that touch) and also a tree-cluster tree (a cluster of trees that touch with tree connectivity). Here I do the same thing with a tree-tree:
See the close but unaligned branches at the bottom. Again the parallel threads are needed, otherwise you get discontinuities:

 It uses a tetrakis hexahedron set of generating spheres, but two of the pyramidal apexes are extra large spheres and therefore overlap considerably:
You can see three of the cube of spheres in the middle. The outer spheres don't overlap apart from the green and orange ones. 

Here's a slight variant that more clearly shows some overlapping branches just below centre:


The other benefit of these parallel overlaps is that multiple non-interacting limit sets can exist inside a single system. That effectively turns a substitution limit set system into a scene graph. You would just need some code to keep track of moving spheres and update the parallel connections according to which spheres they are overlapping. That is for later work.