Noise-1.0.6: A Haskell coherent noise generator based on libnoise

Safe HaskellNone

Math.Noise

Synopsis

Documentation

cubic :: Double -> Double -> Double -> Double -> Double -> DoubleSource

Performs cubic interpolation between two values bound between two other values - The alpha value should range from 0.0 to 1.0. - If the alpha value is 0.0, this function returns the first value. - If the alpha vlaue is 1.0, this function returns the second value.

linear :: Double -> Double -> Double -> DoubleSource

Performs linear interpolation between two values. - The alpha value should range from 0.0 to 1.0. - If the alpha value is 0.0, this function returns the first value. - If the alpha value is 1.0, this function returns the second value.

scurve3 :: Double -> DoubleSource

Maps a value onto a cubic S-curve - the derivative of a cubic S-curve is zero at 0.0 and value at 1.0

scurve5 :: Double -> DoubleSource

Maps a value onto a quintic S-curve. - The first derivative is zero at 0.0 and value at 1.0 - The second derivative is zero at 0.0 and value at 1.0

genNormalized :: (Double, Double, Double, Double) -> Maybe NoiseVectorSource

Generates a normalized vector based on four numbers on the range of [-1.0, 1.0] - This function uses the Cook (1957) method, and may reject pairs

genUniformDistribution :: Int -> [Double]Source

Generates a uniform distribution of Double values on the range [-1.0, 1.0]

getSuitableUniformDist :: Int -> Maybe [(Double, Double, Double, Double)]Source

Generates a uniform distribution that has at least n*4 values that won't be rejected by the vector generation function

genVectors :: Int -> Maybe [NoiseVector]Source

Generates a list of uniformly distributed normalized vectors

toList :: [NoiseVector] -> [Double]Source

Creates a list of Doubles with 0.0 separating each set of 3 Doubles

listTable :: [Double] -> UArray Int DoubleSource

Creates an immutable array from a list of Doubles

staticTable2 :: UArray Int DoubleSource

An immutable table of predefined vectors

constList :: [Double]Source

A constant list of Doubles