Overview
This is a p5.js sketch that further explores the modeling of meandering rivers (Wikipedia).
This builds on the [previous sketch][asdf], adding in (actual) smooth curves using the [Hobby Curve - as implemented by Jake Low] and animation meander over time.
This ended up being more artistic than a scientifically accurate model of what happens, but I’m capping this sketch at this point.
I’ve since come across Robert Hodgin’s ‘Meander’ work, and hope to take some of the modeling he does and apply them in a future iteration of this sketch.
Controls
Configuration:
(via the lil-gui control panel)
num_segments
how many starting lines there are before smoothing takes placewave_amplitude
number of pixels above and below the centerline the sine wave used to place the points will swing.wave_frequency
the number of sine-wave oscillations before the end point.source_heading
the direction of flow for head of the riversmooth_curves
toggles on/off the algorithmic smoothing of the curve.
References:
- Wikipedia: Meandering
- Jake Low - implementation of Hobby Algorithm
- Robert Hodgin - Meander - A very thorough article on his procedural generation of maps of fictitious rivers as they meander over a recreated landscape.