src/perlin

A Noise Generation Library with support for both Perlin noise and Simplex noise.

Simplex Noise

Take a look here:

Based on the implementation found here:

Perlin Noise

Take a look at the following resources:

Procs

proc get(self: Noise; typ: NoiseType; x, y, z: int | float): float

Returns the noise at the given offset. Returns a value between 0 and 1

Note: This method tweaks the input values by just a bit to make sure there are decimal points. If you don't want that, use the 'purePerlin' method instead

proc get(self: Noise; typ: NoiseType; x, y: int | float): float

Returns the noise at the given offset. Returns a value between 0 and 1

Note: This method tweaks the input values by just a bit to make sure there are decimal points. If you don't want that, use the 'purePerlin' method instead

proc perlin(self: Noise; x, y, z: int | float): float

Returns the noise at the given offset. Returns a value between 0 and 1

Note: This method tweaks the input values by just a bit to make sure there are decimal points. If you don't want that, use the 'purePerlin' method instead

proc perlin(self: Noise; x, y: int | float): float

Returns the noise at the given offset. Returns a value between 0 and 1

Note: This method tweaks the input values by just a bit to make sure there are decimal points. If you don't want that, use the 'purePerlin' method instead

proc pureGet(self: Noise; typ: NoiseType; x, y, z: int | float): float
Returns the noise at the given offset without modifying the input. Returns a value between 0 and 1
proc pureGet(self: Noise; typ: NoiseType; x, y: int | float): float
Returns the noise at the given offset without modifying the input. Returns a value between 0 and 1
proc purePerlin(self: Noise; x, y, z: int | float): float
Returns the noise at the given offset without modifying the input. Returns a value between 0 and 1
proc purePerlin(self: Noise; x, y: int | float): float
Returns the noise at the given offset without modifying the input. Returns a value between 0 and 1
proc pureSimplex(self: Noise; x, y, z: int | float): float
Returns the noise at the given offset without modifying the input. Returns a value between 0 and 1
proc pureSimplex(self: Noise; x, y: int | float): float
Returns the noise at the given offset without modifying the input. Returns a value between 0 and 1
proc randomSeed(): uint32 {.inline, ...raises: [], tags: [], forbids: [].}
Returns a random seed that can be fed into a constructor
proc simplex(self: Noise; x, y, z: int | float): float

Returns the noise at the given offset. Returns a value between 0 and 1

Note: This method tweaks the input values by just a bit to make sure there are decimal points. If you don't want that, use the 'purePerlin' method instead

proc simplex(self: Noise; x, y: int | float): float

Returns the noise at the given offset. Returns a value between 0 and 1

Note: This method tweaks the input values by just a bit to make sure there are decimal points. If you don't want that, use the 'purePerlin' method instead