hsnoise-0.0.2: A coherent 3d noise library.



Contains Noise class as well as a general coherent noise generating function which the specific noise implementations are based on.



type Point = (Double, Double, Double)Source

A point in 3-space.

type Seed = IntSource

A seed for a random function.

class Noise a whereSource

Class of noise functions.


noiseValue :: a -> Point -> DoubleSource

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


pmap :: (Double -> Double) -> Point -> PointSource

Map a function on a Point.

clamp :: Ord a => a -> a -> a -> aSource

Returns a clamped value between a min and max value.

coherentNoise :: Seed -> Point -> DoubleSource

Returns a coherent noise value between -1 and 1 given a seed and a point in 3-space.