Tuesday, April 7, 2026

Inversive Global Landscapes

One of the nice things about inversive limit sets is that they typically are deviations from a sphere (e.g. here) so it is tempting to think they could be used to define a global landscape such as mountains, craters and hills on a planet or moon. To get the variety you can use the inversive substitution rules approach of my recent post, which happened to be based on an octahedral configuration of six spheres. You then start with a spherical limit set and switch to varied configurations. There are a wide variety of configuration but in this post I'll consider only distortions, meaning the same connectivity but different placement and size of the spheres.

The problem with the octahedral vertices is that there is only 1 degree of freedom in distorting from a sphere. This gives you a cratered shell-shell all the way to the lumpy tree-tree seen in the recent post, but no others. 

For the tetrahedral spherical limit set it is worse, there are no degrees of freedom. You must stay as a sphere.

For the cubic arrangement there are also no degrees of freedom. The faces must stay planar.

For the dodecahedral arrangement there is no connectivity diagram possible that covers the whole face, which means it does not generate a surface.

That leaves only the icosahedral arrangement among the most symmetrical of spherical limit sets. Its limit set is shown on the right:



Fortunately this does allow at least four degrees of freedom in transitioning from spherical. In these examples the top six spheres remain fixed to allow the transition. I'll give the degrees of freedom parameter names:

Peak: this controls how large the bottom sphere is. 



above right shows the bottom six spheres viewed from below, with red being the enlarged one
Below positive peak value is a tree-tree (left), negative is a shell-shell.

Mid: controls how large the bottom ring of five spheres are.


because the sphere at the bottom is still small it creates a shell-tree (craters and domes). Positive (left) and negative (right):


Ridge: enlarges a ridge of three spheres along the bottom:


positive(left) and negative (right). These seem to generate more ridges and valleys than above.
 

Offset: enlarges a cluster of three spheres at the bottom but offset from centred:


Quite similar quality to the ridge parameter. The ridges and valleys cross each other.
 


From these four degrees of freedom we can create any weighted combination of peak, mid, ridge and offset parameters to describe the landscape one level down from the outer sphere. For instance, here is the globe with the top sphere substituting for the positive ridge set:
Or the top sphere one level down substituting for the ridge set. You can just about make out some indentations here. Which would of course be huge on the zoomed in planet.


Here is a combination of mid 1.4 and ridge 1.7:
which seems to be a little more ridgey and less cratery, here it is on the north polar region:
and here I'm making it more of a snowy mountain white and combining with a green hilly variant (peak 3.8, mid 0.5) and a golden shell-tree variant (peak 1.3, mid 1.6):

So there's more variety to be had with just distortions of the icosahedron. There are also a few other distortion types than just the four shown, but I showed the main ones.

Of course you could also substitute in different topologies with fewer or more than the 12 inversion spheres, but this is a much bigger search space to explore.


Friday, March 13, 2026

Fluvial landscapes

A topic I return to from time to time is fluvial landscapes. These are common in nature but don't seem to fit naturally into any of the standard classes of 3D recursive shape. This post is about extremely simplified descriptions of them. 

About the simplest is this subdivision scheme:

It takes a plan-view right angles triangle and subdivides it in two, lowering by an amount proportional to the side length. Each iteration it flips between lowering or raising the newly added vertex. This has the basics of a fluvial landscape: fractal roughness, angled valleys and ridges. However the valleys follow a blancmange curve in their profile, so water wouldn't run down it like a real fluvial landscape.

Probably the next simplest is to replace the 'midpoint offset' with a smooth profile. Rather than setting the mid height to (z_0 + z_1)/2 we set it to (z_0 + kz_1)/(1+k) where k=e^{al/2} and a describes how concave the slope is and l is the horizontal edge length. 

Here for a=4:

It is less rough though. An improvement is to change a inversely to the edge length, but only on new edges. This stops tributaries from entering at steep angles near the river source, reflecting the idea that they would need to slow down to change direction as they enter the main stream (which is faster and so more sloping).

While the previous was overly blunt (saturated), this one seems a bit overly sharp (desaturated):
I don't think any of these are a perfect archetype for a fluvial landscape, but they are in the right direction. They give dendritic drainage channels and are nicely symmetric between ridges and valleys.

One problem is that lateral valleys on a slope are tilted. It would be nice to find a replacement rule like the ones above that really gives a physical solution to a simple water erosion model. 

Anyway, these are just early thoughts. A super nice implementation that also doesn't require simulated erosion by Run Johansen is here.


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 a slightly non-spherical limit set, which makes a nice basic planet surface:
Now let's make some slightly better vegetation, four different cluster-trees of slightly different colours and sizes:
We can attach them to the octahedral tiles with a transition tile that links to all four trees:
Now if we take a shell-shell to represent craters on the planet:
then we link one of its 6 spheres to the above tree transition tile, then we get some life on the crater structure:

Now we can apply this shell-shell to one of the six spheres in the planet limit set:
It has added lots of craters and the 'vegetation' down in the craters.
Now modifying a whole 6th of the planet is a bit extreme for a large world, so I've added the ability to direct the link to the next set to any descendant sphere, not just one of the generating spheres. Here it applies it to one child sphere (so 1/36th of the world):
The deeper the descendant 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.