panda3d.core.PerlinNoise2

class PerlinNoise2

Bases: PerlinNoise

This class provides an implementation of Perlin noise for 2 variables. This code is loosely based on the reference implementation at https://mrl.nyu.edu/~perlin/noise/ .

Inheritance diagram

Inheritance diagram of PerlinNoise2

__init__() → None

Randomizes the tables to make a unique noise function. Uses a default scale (noise frequency), table size, and seed.

__init__(copy: PerlinNoise2) → None

Makes an exact copy of the existing PerlinNoise object, including its random seed.

__init__(sx: float, sy: float, table_size: int, seed: int) → None

Randomizes the tables to make a unique noise function.

If seed is nonzero, it is used to define the tables; if it is zero a random seed is generated.

assign(copy: PerlinNoise2) → PerlinNoise2
Return type

PerlinNoise2

noise(value: LVecBase2d) → float

Returns the noise function of the three inputs.

noise(value: LVecBase2f) → float

Returns the noise function of the three inputs.

noise(x: float, y: float) → float

Returns the noise function of the three inputs.

setScale(scale: LVecBase2d) → None

Changes the scale (frequency) of the noise.

setScale(scale: LVecBase2f) → None

Changes the scale (frequency) of the noise.

setScale(scale: float) → None

Changes the scale (frequency) of the noise.

setScale(sx: float, sy: float) → None

Changes the scale (frequency) of the noise.