Classes | |
| class | SmoothNoise |
| Class for generating smooth noise. More... | |
| class | SmoothNoise1D |
| Class for generating smooth noise. More... | |
| class | SmoothNoise3D |
| Class for generating smooth noise. More... | |
Functions | |
| def | make_uniform_noise |
| Generates a Grid with uniform noise, generated between 0 and 1. | |
| def | make_checker_board_noise |
| def | perlin_noise_from_smoothnoise |
| Private. | |
| def | perlin_noise |
| Generates Perlin noise in a rectangle. | |
| def | perlin_noise_tileable |
| Generates tiles of Perlin noise that are mutually seamless. | |
| def | int_perlin_noise |
| Generates integer Perlin noise in a rectangle. | |
| def | random_permutation |
| Returns a shuffled list of integers in the range 0 to n - 1. | |
| def | sample_points |
| Private. | |
| def | sample_points_cubic |
| def | uniform_noise_3d |
| def | make_uniform_noise_1d |
| def | perlin_noise_from_smoothnoise_1d |
| Private. | |
| def | perlin_noise_from_smoothnoise_3d |
| Private. | |
| def | perlin_noise_3d |
| Generates integer Perlin noise in a 3D box. | |
Tutorial: http://www.luma.co.za/labs/2008/01/20/perlin-noise/
| def perlin_noise.int_perlin_noise | ( | width, | ||
| height, | ||||
| layers, | ||||
| n, | ||||
tiles = 1 | ||||
| ) |
Generates integer Perlin noise in a rectangle.
| width | The width of the rectangle. | |
| height | The height of the rectangle | |
| layers | The number of layers of smooth noise to use. | |
| n | The integer range for the resulting noise. If n is 7, for example, all values in the grid will be 0, 1, 2, 3, 4, 5, or 6. | |
| tiles | The number of tiles to generate. These tiles will all tile with themselves and each other. |
Definition at line 232 of file perlin_noise.py.
| def perlin_noise.make_checker_board_noise | ( | width, | ||
| height, | ||||
period = 1 | ||||
| ) |
Definition at line 35 of file perlin_noise.py.
| def perlin_noise.make_uniform_noise | ( | width, | ||
| height | ||||
| ) |
Generates a Grid with uniform noise, generated between 0 and 1.
| width | The width of the Grid to produce. | |
| height | The height of the Grid to produce. |
Definition at line 27 of file perlin_noise.py.
| def perlin_noise.make_uniform_noise_1d | ( | length | ) |
Definition at line 290 of file perlin_noise.py.
| def perlin_noise.perlin_noise | ( | width, | ||
| height, | ||||
| layers, | ||||
falloff = 0.5, |
||||
tiles = 1 | ||||
| ) |
Generates Perlin noise in a rectangle.
| width | The width of the rectangle. | |
| height | The height of the rectangle | |
| layers | The number of layers of smooth noise to use. | |
| tiles | The number of tiles to generate. These tiles will all tile with themselves and each other. |
Definition at line 184 of file perlin_noise.py.
| def perlin_noise.perlin_noise_3d | ( | width, | ||
| height, | ||||
| depth, | ||||
| layers, | ||||
falloff = 0.5, |
||||
tiles = 1 | ||||
| ) |
Generates integer Perlin noise in a 3D box.
| width | The width of the box. | |
| height | The height of the box | |
| depth | The depth of the box | |
| layers | The number of layers of smooth noise to use. | |
| n | The integer range for the resulting noise. If n is 7, for example, all values in the grid will be 0, 1, 2, 3, 4, 5, or 6. | |
| tiles | The number of tiles to generate. These tiles will all tile with themselves and each other. |
Definition at line 472 of file perlin_noise.py.
| def perlin_noise.perlin_noise_from_smoothnoise | ( | width, | ||
| height, | ||||
| layers, | ||||
| falloff, | ||||
| noise, | ||||
normalize = True | ||||
| ) |
Private.
| noise | A noise grid from which the first row and first column will be copied. |
Definition at line 148 of file perlin_noise.py.
| def perlin_noise.perlin_noise_from_smoothnoise_1d | ( | length, | ||
| layers, | ||||
| falloff, | ||||
| noise, | ||||
normalize = True | ||||
| ) |
Private.
| noise | A noise grid from which the first row and first column will be copied. |
Definition at line 353 of file perlin_noise.py.
| def perlin_noise.perlin_noise_from_smoothnoise_3d | ( | width, | ||
| height, | ||||
| depth, | ||||
| layers, | ||||
| falloff | ||||
| ) |
| def perlin_noise.perlin_noise_tileable | ( | width, | ||
| height, | ||||
| layers, | ||||
falloff = 0.5, |
||||
tiles = 1 | ||||
| ) |
Generates tiles of Perlin noise that are mutually seamless.
| width | The width of the rectangle. | |
| height | The height of the rectangle | |
| layers | The number of layers of smooth noise to use. | |
| tiles | The number of tiles to generate. These tiles will all tile with themselves and each other. |
Definition at line 205 of file perlin_noise.py.
| def perlin_noise.random_permutation | ( | n | ) |
Returns a shuffled list of integers in the range 0 to n - 1.
Definition at line 247 of file perlin_noise.py.
| def perlin_noise.sample_points | ( | x, | ||
| t, | ||||
| max_x | ||||
| ) |
Private.
Returns a tuple that can be used for cubic interpolation the tuple is the tuple x0, x1, x2, x3, alpha such that
x0 = x // t * t x1 = x0 + t x = alpha * t + x0 x = x1 - (1 - alpha) * t x0 <= x <x1
Definition at line 261 of file perlin_noise.py.
| def perlin_noise.sample_points_cubic | ( | x, | ||
| t, | ||||
| max_x | ||||
| ) |
Definition at line 265 of file perlin_noise.py.
| def perlin_noise.uniform_noise_3d | ( | width, | ||
| height, | ||||
| depth | ||||
| ) |
Definition at line 282 of file perlin_noise.py.
1.5.8