Yesterday, I gave a guest lecture about climate change (past, present, future).

As a motivating example, I showed an aerial image that I took during a helicopter flight aorund Aoraki / Mount Cook National Park in May.

There is so much structure in that image and I thought, “I could come up with an approximation for that river bed!”.

A few hours later (and thanks to ChatGPT), I had a phenomenological model that would describe the main features of the river bed and the flow of the water within.

The toy model below has 3 main parameters, displacement, decay, and max dimension. You can try to match the real world by changing those. water percentage is a visual effect that color-codes a percentage of all lines in a watery color.

Seed:

Further details

Rivers naturally form curves, or meanders, because of the way water flows and interacts with the river banks. When water flows around a slight bend, it moves faster on the outer edge and slower on the inner edge. The faster water erodes the outer bank, while the slower water deposits sediment on the inner bank. This feedback makes the bend grow over time, producing the winding patterns we see in meandering rivers, oxbow lakes, and floodplains.

In our simulation, we mimic this process by repeatedly shifting the midpoint of each river segment in a random perpendicular direction. This models the instability and sideways migration of real rivers. Mathematically, the river’s centerline \(y(x)\) could be described by a simple equation:

\[\frac{\partial y}{\partial t} = D \frac{\partial^2 y}{\partial x^2} + \eta(x,t)\]

Here, \(D\) represents smoothing effects like natural sediment spreading, and \(\eta(x,t)\) is a random term representing local variations in erosion and deposition.

The midpoint displacement algorithm is a simple way to recreate this: each subdivision adds a small random shift, controlled by a displacement parameter \(p\) that gets smaller at finer scales (controlled by decay \(d\)). After that, Chaikin’s smoothing spreads out sharp bends, similar to how real rivers naturally diffuse their curves. Together, these steps create winding, natural-looking river shapes that balance the randomness of erosion with the smoothing effects of sediment redistribution.