mirror of
https://gitlab.com/gaelysam/mapgen_rivers.git
synced 2024-11-13 06:10:21 +01:00
Rework default erosion parameters,
Fix ignored values of K and m, and changed processes order.
This commit is contained in:
parent
7529291ab4
commit
9b4a9b2516
12
generate.py
12
generate.py
|
@ -94,14 +94,12 @@ nn = n*vscale + offset
|
|||
### COMPUTE LANDSCAPE EVOLUTION
|
||||
# Initialize landscape evolution model
|
||||
print('Initializing model')
|
||||
model = terrainlib.EvolutionModel(nn, K=1, m=0.35, d=1, sea_level=0, flex_radius=flex_radius)
|
||||
model = terrainlib.EvolutionModel(nn, K=K, m=m, d=d, sea_level=sea_level, flex_radius=flex_radius)
|
||||
terrainlib.update(model.dem, model.lakes, t=5, title='Initializing...')
|
||||
|
||||
dt = time/niter
|
||||
|
||||
# Run the model's processes: the order in which the processes are run is arbitrary and could be changed.
|
||||
print('Initial flow calculation')
|
||||
model.calculate_flow()
|
||||
|
||||
for i in range(niter):
|
||||
disp_niter = 'Iteration {:d} of {:d}...'.format(i+1, niter)
|
||||
|
@ -109,12 +107,16 @@ for i in range(niter):
|
|||
print(disp_niter)
|
||||
print('Diffusion')
|
||||
model.diffusion(dt)
|
||||
print('Flow calculation')
|
||||
model.calculate_flow()
|
||||
terrainlib.update(model.dem, model.lakes, title=disp_niter)
|
||||
print('Advection')
|
||||
model.advection(dt)
|
||||
print('Isostatic equilibration')
|
||||
model.adjust_isostasy()
|
||||
print('Flow calculation')
|
||||
model.calculate_flow()
|
||||
|
||||
print('Last flow calculation')
|
||||
model.calculate_flow()
|
||||
|
||||
print('Done!')
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ offset = 0
|
|||
persistence = 0.6
|
||||
lacunarity = 2.0
|
||||
|
||||
K = 1
|
||||
m = 0.35
|
||||
d = 0.2
|
||||
K = 0.5
|
||||
m = 0.5
|
||||
d = 0.5
|
||||
sea_level = 0
|
||||
flex_radius = 20
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
mapsize = 1000
|
||||
scale = 400
|
||||
vscale = 500
|
||||
vscale = 600
|
||||
offset = 0
|
||||
persistence = 0.65
|
||||
lacunarity = 2.0
|
||||
|
||||
K = 0.5
|
||||
m = 0.5
|
||||
d = 0.1
|
||||
m = 0.55
|
||||
d = 0.45
|
||||
sea_level = 0
|
||||
flex_radius = 100
|
||||
flex_radius = 50
|
||||
|
||||
time = 10
|
||||
niter = 10
|
||||
|
|
Loading…
Reference in New Issue
Block a user