June 27, 2020

All Together Now

As I revisit my generation process from top to bottom (as I do every few quarters), it might be helpful to have a flowchart or at least a process list, both for my own reference and the general welfare of the public.
  1. Terrain generation, either from code or manually input (do not recommend)
  2. Derive currents by a) determining major trade currents at 0 and 45 latitudes, b) extending these currents and splitting them where they hit landforms, and c) interpolating these currents via IDW to make a nice smooth surface. I also have found that d) applying a Gaussian smooth filter to the results is even nicer.
  3. Assign sea surface temperature (SST) and measure the effect of the currents on that temperature: currents from the poles bringing cooler water down to the equator and vice versa.
  4. Generate areas of high and low pressure
  5. From the pressure map, obtain wind direction and speeds
  6. Determine the effect of topography on wind
  7. Apply base precipitation and use the on-shore winds to blow that moisture across the continents
  8. Use the coastal current temperatures and on-shore winds to determine areas of coastal climate influence
  9. Apply base temperature, then modify it according to the coastal climates
  10. Lapse the temperature up mountain slopes
  11. Run Koppen and Holdridge algorithms
At this point, social simulation can take over.

June 25, 2020

Currents V: Refresher

Try to avoid SVGs with a quarter million linked objects, if you can.

In the meantime, the currents are looking nice when applied to the generated terrain surface.

I begin with a handful of hexes in the ocean, on the coasts where the trade winds are blowing more or less perpendicularly into the ocean. I then propagate this current forward (curving around the map folds). When the current reaches an opposite coast, it curves back around.

The next step is to fill in all the gaps using IDW (with nearest neighbor distance $k=20$ and exponent $n=2$), which I've used quite commonly in the past for many applications. It's a really useful little algorithm. This generates a smooth fill.

Lastly, I apply a Gaussian filter to smooth out the sharp bits even more.

This has proven more than adequate for my needs, especially concerning the influence of cold and warm coastal currents, as well as trade and migration routes further down the line. The possibilities present themselves endlessly.

June 23, 2020

Elevation XVII: Lift Up Your Heads

I've been working on the topography generator for quite some time now. I think it's time to put a pin in it. There's still so much to be done, but I need to take a break.

It's looking much better than it was. The endorheic algorithm, which helps basins find their way to the sea, is by far the most inefficient/slow part of the code, and so I think future iterations may try to address that.
GIF of elevation+erosion algorithm at work

This is a good opportunity to start working back through all the rest of the climate generation code to bring life to this map (and by extension, any other generated topography). There is a lot of clean-up to do.