A Noise Generation Library with support for both Perlin noise and Simplex noise.
Simplex Noise
Take a look here:
- http://webstaff.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
- http://stackoverflow.com/questions/18279456/any-simplex-noise-tutorials-or-resources
Based on the implementation found here:
Perlin Noise
Take a look at the following resources:
- http://mrl.nyu.edu/~perlin/noise/
- http://flafla2.github.io/2014/08/09/perlinnoise.html
- http://riven8192.blogspot.com/2010/08/calculate-perlinnoise-twice-as-fast.html
Procs
proc perlin(self: Noise; x, y, z, w: SomeNumber): float
-
Returns the noise at the given position. 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 purePerlin(self: Noise; x, y, z, w: SomeNumber): 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: SomeNumber): 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: SomeNumber): 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: SomeNumber): 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: SomeNumber): 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