From 85e545d5ac5cbe14dee92941b429a777843a08f4 Mon Sep 17 00:00:00 2001 From: Gael-de-Sailly Date: Thu, 24 Dec 2020 13:09:08 +0100 Subject: [PATCH] Fixed sea level variations --- generate.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/generate.py b/generate.py index 783d5a5..50aee7f 100755 --- a/generate.py +++ b/generate.py @@ -95,11 +95,6 @@ niter = int(get_setting('niter', 10)) ### MAKE INITIAL TOPOGRAPHY n = np.zeros((mapsize+1, mapsize+1)) -if sea_level_variations != 0.0: - sea_ybase = np.random.randint(8192)-4096 - sea_level_ref = snoise2(time * (1-1/niter) / sea_level_variations, sea_ybase, **params_sealevel) * sea_level_variations - offset -= (sea_level_ref + sea_level) - # Set noise parameters params = { "offset" : offset, @@ -116,6 +111,11 @@ params_sealevel = { "lacunarity" : 2, } +if sea_level_variations != 0.0: + sea_ybase = np.random.randint(8192)-4096 + sea_level_ref = snoise2(time * (1-1/niter) / sea_level_variations, sea_ybase, **params_sealevel) * sea_level_variations + params['offset'] -= (sea_level_ref + sea_level) + n = noisemap(mapsize+1, mapsize+1, **params) ### COMPUTE LANDSCAPE EVOLUTION