Saturday, April 11, 2026

Improving Global Landscapes

Looking at the mixed landscape from the previous post
there are a few problems that would be nice to address. The first is that substituting in a child limit set creates a distribution of patches (good) but each patch is solidly that one limit set, which looks a bit extreme. Here I show a simple case of substituting the green tree-tree set on the top sphere:

bottom image is the generating spheres with an arrow showing the substitution.

We can get rid of that solidity by making the child limit set substitute back to the parent. In this case the same sphere is substituting back:


I prefer this way of viewing the substitutions, even if it could sometimes be ambiguous:

You can substitute a different sphere back to get a less geometric result:
but I'm not sure if the surface is continuous in this case. You have to be careful with overlapping spheres when making substitutions.

If the tree area is now too sparse you can substitute back to the golden sphere limit set only on a grandchild instead:
barely noticeable from this distance but there are little patches of 'smooth earth' inside the green areas here.

The second problem is that the patches are perfectly round. In fact deeper zooms would be less round patches as that is partially due to the outer set being perfectly icosahedral. But they'd still be fairly round. 

One way to fix this is to substitute multiple overlapping spheres across to the child set rather than lone spheres. The first step would be two overlapping spheres.  

The only way I know how to do this currently is for those two spheres and neighbours to be the same (up to a Mobius transformation) in the child limit set. That reduces the free spheres to adjust to four. But due to the lack of symmetry it only allows one parameter to change. So back to tree-tree / shell-shell structures.

If we make a brown such tree-tree on sphere 0:
then we can also add one to sphere 1, since we made the child set match 0,1 and their neighbours:
this is continuoue and invariant to order of sphere processing. If we make sphere 0's sphere 0 substitute to child sphere 0 and sphere 1's sphere 1 substitute to child sphere 1 then we get smaller surface patches. They are round in some places, but at the overlap (top left) they combine correctly into longer shapes, which wouldn't otherwise happen. We usually have problems when substituting neighbouring spheres: 


The third problem is that we can't do substitutions on neighbouring spheres. But we can use the same solution above, just give the child sets different values of the shell-shell to tree-tree parameter. 

Here sphere 0 links to the brown tree-tree set and sphere 1 links to the grey shell-shell:
Notice that the overlap between top and left patches prioritises sphere 0 (top). That means sphere processing order does effect the shape. The only fix to this would be to create some sort of tree/shell mixture in the overlap and I currently don't know how to do this.

Nevertheless, the landscape still works in the sense of being continuous. And just as discussed at the top, the patches neededn't be solid, we can for instance substitute sphere 0 of the shell child back to the tree child and sphere 1 of the tree child back to the shell child:

This produces a lot of variety, with three sets being blended (pale grey sphereical, grey craters and brown hills) and the two child sets overlapping. Nevertheless we are only working with a one-parameter knob, from crater to hills. 

We can do better than this by making a special set for the overlap region between child sets A and B. We allow A and B their full usual freedom where only the replacement ball and its neighbours are constrained to the parent balls. For this icosahedral configuration that means 6 balls of freedom. 

The overlap set is constrained so that A's constrained ball indices are constrained between the overlap set and B, while B's constrained ball indices are constrained between the overlap and A. That leaves 4 balls of freedom on the overlap set. 

Below uses the ridgey set in green for ball 0 and a hilly set in brown for ball 1:
Note the discontinuity (gap) between green and brown. Now we add in the interpolating overlap set:



These are two variants, the left uses the green shape for the four free balls and the right uses the brown hilly shape. In both cases the overlap region exactly connects the brown and green sets together.

You can also see in the bottom right that this overlap automatically applies to the smaller patches too. 

Bottom left you see a green patch that doesn't have an overlap region with the large brown region on the left. This is a discontinuity, so we need to apply the intermediate patch to this too. 

To do this requires a careful procedure inside the iteration loop:
1. whenever inside a sphere with a substitution set,  record this substitution set as destination_set.
2. if the query point leaves either this sphere or its neighbours then switch to destination_set.
3. if the query point ends up in any overlapping sphere with a substitution set, then switch to that overlap set

The result applies the transitional set on the smaller green patches too:


and you can also see that the orange patches transition onto the bigger green patch. 

In terms of 2D classification, the non-overlapping substitution sets were a cluster-solid of patches, whereas the overlapping substitution sets form a tree-solid of patches. The outline of green-and-brown is a fractal tree, which is quite nice as it is a more natural transition than a smooth disk. It for instance matches the sort of shape of mountains over flatlands or snowcaps over a mountain range.

It doesn't just work on a sphere, here's a cratered globe (by pulling in the lowest sphere):
The brown hilly set and the green ridgey set are:
Adding the ridges to sphere 0 and hills to sphere 1, together with the transitional overlap set:

The above craters don't overlap the two child sets, so let's get a bit more adventurous and dent sphere 2, which is a neighbour of both child sets (at sphere's 0 and 1):
 
and a close up:

So this is a good indication that the method is working, and that it really is adding these child sets without discontinuity. 








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 arrangement is that there is only one 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. Even here the degree of freedom is only when the octahedron is perfectly regular.

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 regular 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 times 1.4 and ridge times 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.

It is interesting to see that there is a class of surfaces that is different from the standard shell-tree. Its craters and domes cross over each other to generate a surface of ridges, valleys, and saddles where they meet. This is closer to realistic landscapes where ridges and valleys are common.

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.