TerrainGeneration
From OpenCity
[edit]
State of Art
[edit]
Implementation
An abstract base class for TerrainGenerator, and at lest inherited by
- a generator
- an heightmap file loader
Plus tools like
- nomalizator(min, mix): shift, and re-range the map height, able to set probabilistic percent of water.
minL, maxL = getMinMax(map); a = (max-min) / (maxL-minL); b = -minL*a+min; place = a*(place-minL)+min
- flattenizator(coef): flattern the plains, and raise contrast with hills
min, max = getMinMax(map); coef = max-min; place = (((place-min)/coef)^power)*coef+min
- gaussian blur: smoth and lowlevel filter
- flooding
- rivers/lakes calculator
- and maybe some singularity generators (crater, caldera, ...).

