Public Member Functions | |
def | __init__ |
Constructs a new SmoothNoise object. | |
def | generate |
Generates a grid with the smooth noise. | |
def | linear_interpolation |
def | cosine_interpolation |
def | cubic_interpolation |
Public Attributes | |
nois_fn | |
uniform_noise | |
width | |
height | |
interpolation |
Successive calls to generate will use the same underlying grid of uniform noise to sample from.
Definition at line 48 of file perlin_noise.py.
def perlin_noise.SmoothNoise.__init__ | ( | self, | ||
width, | ||||
height, | ||||
noise_fn = make_uniform_noise , |
||||
interpolation = 'linear' | ||||
) |
Constructs a new SmoothNoise object.
width | Width of the grid to generate | |
height | Height of the grid to generate | |
noise_fn | A function that takes two arguments (the grid dimensions) and return a grid of noise | |
interpolation | A string that specifies what interpolation scheme to use. Can be 'linear', 'cosine', or 'cubic'. |
Definition at line 59 of file perlin_noise.py.
def perlin_noise.SmoothNoise.cosine_interpolation | ( | self, | ||
k | ||||
) |
Definition at line 102 of file perlin_noise.py.
def perlin_noise.SmoothNoise.cubic_interpolation | ( | self, | ||
k | ||||
) |
Definition at line 120 of file perlin_noise.py.
def perlin_noise.SmoothNoise.generate | ( | self, | ||
k | ||||
) |
Generates a grid with the smooth noise.
k | The sampling distance, usually a power of 2. If k == 1, every point in the uniform noise grid is sampled and the returned grid is equivalent to the uniform noise grid. |
Definition at line 82 of file perlin_noise.py.
def perlin_noise.SmoothNoise.linear_interpolation | ( | self, | ||
k | ||||
) |
Definition at line 85 of file perlin_noise.py.
Definition at line 64 of file perlin_noise.py.
Definition at line 67 of file perlin_noise.py.
Definition at line 60 of file perlin_noise.py.
Definition at line 61 of file perlin_noise.py.
Definition at line 63 of file perlin_noise.py.