neodroidvision.utilities.misc.perlin.PerlinNoiseGenerator

class neodroidvision.utilities.misc.perlin.PerlinNoiseGenerator(dimension, octaves=1, tile=(), unbias=False)[source]

Bases: object

Callable that produces Perlin noise for an arbitrary point in an arbitrary number of dimensions. The underlying grid is aligned with the integers. There is no limit to the coordinates used; new gradients are generated on the fly as necessary.

__init__(dimension, octaves=1, tile=(), unbias=False)[source]

Create a new Perlin noise factory in the given number of dimensions, which should be an integer and at least 1. More octaves create a foggier and more-detailed noise pattern. More than 4 octaves is rather excessive. tile can be used to make a seamlessly tiling pattern. For example:

pnf = PerlinNoiseGenerator(2, tile=(0, 3))

This will produce noise that tiles every 3 units vertically, but never tiles horizontally. If unbias is true, the smoothstep function will be applied to the output before returning it, to counteract some of Perlin noise’s significant bias towards the center of its output range.

Methods

__init__(dimension[, octaves, tile, unbias])

Create a new Perlin noise factory in the given number of dimensions, which should be an integer and at least 1. More octaves create a foggier and more-detailed noise pattern. More than 4 octaves is rather excessive. tile can be used to make a seamlessly tiling pattern. For example: pnf = PerlinNoiseGenerator(2, tile=(0, 3)) This will produce noise that tiles every 3 units vertically, but never tiles horizontally. If unbias is true, the smoothstep function will be applied to the output before returning it, to counteract some of Perlin noise's significant bias towards the center of its output range.

get_plain_noise(*point)

Get plain noise for a single point, without taking into account either octaves or tiling.

get_plain_noise(*point)[source]

Get plain noise for a single point, without taking into account either octaves or tiling.