Commit Graph

12 Commits

Author SHA1 Message Date
Gael-de-Sailly 462942cc22 Use iterative finite differences for diffusion, instead of gaussian blur
Allows variable diffusion coefficients
2020-12-27 13:46:25 +01:00
Gael-de-Sailly 3ccb6932ad Implement simple tectonics.
Uplift and subsidence are determined with a noise, at every iteration.
There is no distinctive pattern like tectonic plates, just vertical movements
disturbing rivers from their equilibrium state, and thus creating more diversity.
More lakes and waterfalls especially.
2020-12-24 15:35:27 +01:00
Gael-de-Sailly e0aecdc3f3 Added a second method for local flow calculation. It is possible to switch between them using the 'flow_method' parameter. 2020-12-24 14:48:17 +01:00
Gael-de-Sailly 2a9335332b Added optional sea level variations for the simulation.
This results in more varied coastline morphologies.
2020-12-24 14:48:17 +01:00
Gael-de-Sailly 7529291ab4 For bounds.py (calculation of offsets), use the same data type as rivers 2020-12-24 14:48:17 +01:00
Gael-de-Sailly 3dc874a494 Added description of the algorithm + acknowledge the authors of the paper. 2020-12-24 14:48:17 +01:00
Gael-de-Sailly f0dddee33c Lakes map: keep initial height (reduces file size)
Lake height is calculated for every basin, and there is a lake if lake height is higher than ground height. If it is lower, there is no lake.
In that case, it was previously raised to ground level, but since this can be done in Lua, we can write initial lakes height in the files.
This has the advantage of reducing file size, since there are bigger areas of equal values, that are more efficiently compressed.
2020-12-24 14:48:17 +01:00
Gael-de-Sailly ecd2c7d3f9 Completely change flow routing algorithm,
use a local flow calculation, determine depressions, and link them using a minimum spanning tree (Boruvka's algorithm).
This is based on a paper by Cordonnier et al, 2019.
2020-12-24 14:48:17 +01:00
Gael-de-Sailly 40098d6be3 Use standard int instead of uint8, int32, etc.
Much faster with NumPy.
2020-12-24 14:48:17 +01:00
Gael-de-Sailly 53f88d337d Protect map preview from exceptions
Since map preview is optional, an exception should not propagate to terrain calculation, so print an error message + traceback but keep the script running.
2020-11-25 13:12:24 +01:00
Gael-de-Sailly 1f41423104 Print a clear message when grid is ready
Also use plt.pause before plotting, ensuring plot is updated in real time
2020-11-15 11:13:42 +01:00
Gael-de-Sailly d93234c9b7 Moved Python files inside a folder (package), except the 2 that are directly executable 2020-11-14 17:35:27 +01:00