Skip to content

Commit 3570149

Browse files
committed
Update README
1 parent 986ef4e commit 3570149

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

README.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,46 @@ I wrote an [article](https://pvigier.github.io/2018/06/13/perlin-noise-numpy.htm
66

77
A fast and simple perlin noise generator using numpy.
88

9-
The function `generate_perlin_noise_2d` generates the classical perlin noise. Its parameters are:
9+
### 2D noise
1010

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)
1334

1435
Note: `shape` must be a multiple of `res`
1536

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:
1738

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)
2041
* `octaves`: number of octaves in the noise (int)
2142
* `persistence`: scaling factor between two octaves (float)
2243

2344
Note: `shape` must be a multiple of `octaves*res`
2445

2546
## Gallery
2647

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)

examples/fractal3d.gif

3.34 MB
Loading

examples/perlin3d.gif

2.62 MB
Loading

0 commit comments

Comments
 (0)