Logan Zoellner commited on
Commit
72d2c17
·
1 Parent(s): c71253d

use inputs

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,12 +7,12 @@ import random
7
  import numpy as np
8
  from perlin_numpy import generate_fractal_noise_2d
9
 
10
- def create_fractal_noise(size,n_octaves, n_layers, seed):
11
  """
12
  Generate fractal noise using the Perlin noise algorithm.
13
  """
14
- np.random.seed(0)
15
- noise = generate_fractal_noise_2d((256, 256), (8, 8), 5)
16
  #reshape
17
  n3=np.repeat(n[:,:,np.newaxis],3,axis=2)
18
  #change from [-1,1] to [0,255]
 
7
  import numpy as np
8
  from perlin_numpy import generate_fractal_noise_2d
9
 
10
+ def create_fractal_noise(input_seed,input_size,res,n_octaves,persistence):
11
  """
12
  Generate fractal noise using the Perlin noise algorithm.
13
  """
14
+ np.random.seed(input_seed)
15
+ noise = generate_fractal_noise_2d((input_size, input_size), (res, res), n_octaves, persistence)
16
  #reshape
17
  n3=np.repeat(n[:,:,np.newaxis],3,axis=2)
18
  #change from [-1,1] to [0,255]