hsnoise-0.0.2: A coherent 3d noise library.

Numeric.Noise.Perlin

Description

Implementation of Perlin noise.

Example of use:

main = putStrLn ("Noise value at (1, 2, 3): " ++ show x)
    where seed        = 1
          octaves     = 5
          scale       = 0.05
          persistance = 0.5
          perlinNoise = perlin seed octaves scale persistance
          x           = noiseValue perlinNoise (1, 2, 3)

Synopsis

Documentation

data Perlin Source

A Perlin noise function.

Instances

perlin :: Seed -> Int -> Double -> Double -> PerlinSource

Constructs a Perlin noise function given a seed, number of octaves, scale, and persistance.

noiseValue :: Noise a => a -> Point -> DoubleSource

Maps 3-space points to a noise value between -1 and 1 for the given noise function.