@@ -6,23 +6,46 @@ I wrote an [article](https://pvigier.github.io/2018/06/13/perlin-noise-numpy.htm
6
6
7
7
A fast and simple perlin noise generator using numpy.
8
8
9
- The function ` generate_perlin_noise_2d ` generates the classical perlin noise. Its parameters are:
9
+ ### 2D noise
10
10
11
- * ` shape ` : shape of the generated array (tuple of ints)
12
- * ` res ` : number of periods of noise to generate along each axis (tuple of ints)
11
+ The function ` generate_perlin_noise_2d ` generates a 2D texture of perlin noise. Its parameters are:
12
+
13
+ * ` shape ` : shape of the generated array (tuple of 2 ints)
14
+ * ` res ` : number of periods of noise to generate along each axis (tuple of 2 ints)
15
+
16
+ Note: ` shape ` must be a multiple of ` res `
17
+
18
+ The function ` generate_fractal_noise_2d ` combines several octaves of 2D perlin noise to make 2D fractal noise. Its parameters are:
19
+
20
+ * ` shape ` : shape of the generated array (tuple of 2 ints)
21
+ * ` res ` : number of periods of noise to generate along each axis (tuple of 2 ints)
22
+ * ` octaves ` : number of octaves in the noise (int)
23
+ * ` persistence ` : scaling factor between two octaves (float)
24
+
25
+ Note: ` shape ` must be a multiple of ` octaves*res `
26
+
27
+
28
+ ### 3D noise
29
+
30
+ The function ` generate_perlin_noise_3d ` generates a 3D texture of perlin noise. Its parameters are:
31
+
32
+ * ` shape ` : shape of the generated array (tuple of 3 ints)
33
+ * ` res ` : number of periods of noise to generate along each axis (tuple of 3 ints)
13
34
14
35
Note: ` shape ` must be a multiple of ` res `
15
36
16
- Moreover the function ` generate_fractal_noise_2d ` combines several octaves of perlin noise to make fractal noise. Its parameters are:
37
+ The function ` generate_fractal_noise_2d ` combines several octaves of 3D perlin noise to make 3D fractal noise. Its parameters are:
17
38
18
- * ` shape ` : shape of the generated array (tuple of ints)
19
- * ` res ` : number of periods of noise to generate along each axis (tuple of ints)
39
+ * ` shape ` : shape of the generated array (tuple of 3 ints)
40
+ * ` res ` : number of periods of noise to generate along each axis (tuple of 3 ints)
20
41
* ` octaves ` : number of octaves in the noise (int)
21
42
* ` persistence ` : scaling factor between two octaves (float)
22
43
23
44
Note: ` shape ` must be a multiple of ` octaves*res `
24
45
25
46
## Gallery
26
47
27
- ![ Perlin noise] ( https://github.com/pvigier/perlin-numpy/raw/master/examples/perlin2d.png )
28
- ![ Fractal noise] ( https://github.com/pvigier/perlin-numpy/raw/master/examples/fractal2d.png )
48
+ ![ 2D Perlin noise] ( https://github.com/pvigier/perlin-numpy/raw/master/examples/perlin2d.png )
49
+ ![ 2D fractal noise] ( https://github.com/pvigier/perlin-numpy/raw/master/examples/fractal2d.png )
50
+ ![ 3D Perlin noise] ( https://github.com/pvigier/perlin-numpy/raw/master/examples/perlin3d.gif )
51
+ ![ 3D fractal noise] ( https://github.com/pvigier/perlin-numpy/raw/master/examples/fractal3d.gif )
0 commit comments