IFS-0.1: Iterated Function System generation for HaskellContentsIndex
Graphics.IFS
Portabilityportable
Stabilityexperimental
Maintainermisc@alpheccar.org
Contents
Types
Drawing an IFS
IFS creation functions
Description

Description

Iterated Function Systems in Haskell

Synopsis
data IFS a
type Pixel = (Int, Word8)
drawIFS :: Int -> Int -> Int -> IFS Double -> [Pixel]
(<+>) :: IFS a -> IFS a -> IFS a
(<?>) :: Double -> IFS a -> IFS a
linearIFS :: M a -> IFS a
Types
data IFS a
An IFS is expressed in a [0,1]x[0,1] squares. So, the linear transforms used to build it must take that into account.
show/hide Instances
Num a => Module a (IFS a)
Fractional a => Module (M a) (IFS a)
Num a => Module (NonLinear a) (IFS a)
type Pixel = (Int, Word8)
A position in an array of pixels and the color index
Drawing an IFS
drawIFS
:: IntWidth of the IFS square in pixel (the IFS is contained in a [0,1]x[0,1] square)
-> IntHeight of the IFS square
-> IntNumber of pixels to generate
-> IFS DoubleThe IFS
-> [Pixel]List of pixels
Draw an IFS
IFS creation functions
(<+>) :: IFS a -> IFS a -> IFS a
Union of two IFS (probabilities are normalized if required when the IFS is drawn)
(<?>) :: Double -> IFS a -> IFS a
Multiply IFS probabilities
linearIFS :: M a -> IFS a
Create a linear IFS from an affine transformation
Produced by Haddock version 0.8