Spaces:
Runtime error
Runtime error
Logan Zoellner
commited on
Commit
·
72d2c17
1
Parent(s):
c71253d
use inputs
Browse files
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(
|
11 |
"""
|
12 |
Generate fractal noise using the Perlin noise algorithm.
|
13 |
"""
|
14 |
-
np.random.seed(
|
15 |
-
noise = generate_fractal_noise_2d((
|
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]
|