Documentation
¶
Overview ¶
Package perlin provides coherent noise function over 1, 2 or 3 dimensions This code is go adaptagion based on C implementation that can be found here: http://git.gnome.org/browse/gegl/tree/operations/common/perlin/perlin.c (original copyright Ken Perlin)
Index ¶
Constants ¶
const ( B = 0x100 N = 0x1000 BM = 0xff )
General constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Perlin ¶
type Perlin struct {
// contains filtered or unexported fields
}
Perlin is the noise generator
func NewPerlin ¶
NewPerlin creates new Perlin noise generator In what follows "alpha" is the weight when the sum is formed. Typically it is 2, As this approaches 1 the function is noisier. "beta" is the harmonic scaling/spacing, typically 2, n is the number of iterations and seed is the math.rand seed value to use
func NewPerlinRandSource ¶
NewPerlinRandSource creates new Perlin noise generator In what follows "alpha" is the weight when the sum is formed. Typically it is 2, As this approaches 1 the function is noisier. "beta" is the harmonic scaling/spacing, typically 2, n is the number of iterations and source is source of pseudo-random int64 values