IFS-0.1.1: Iterated Function System generation for Haskell

Portabilityportable
Stabilityexperimental
Maintainermisc@alpheccar.org

Graphics.IFS

Contents

Description

Description

Iterated Function Systems in Haskell

Synopsis

Types

data IFS a Source

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.

Instances

Num a => Module a (IFS a)

For applying a scalar transformation to an IFS

Num a => Module (NonLinear a) (IFS a)

For applying a non linear transformation to the IFS

Fractional a => Module (M a) (IFS a)

For applying a linear transformation to an IFS

type Pixel = (Int, Word8)Source

A position in an array of pixels and the color index

Drawing an IFS

drawIFSSource

Arguments

:: Int

Width of the IFS square in pixel (the IFS is contained in a [0,1]x[0,1] square)

-> Int

Height of the IFS square

-> Int

Number of pixels to generate

-> IFS Double

The IFS

-> [Pixel]

List of pixels

Draw an IFS

IFS creation functions

(<+>) :: IFS a -> IFS a -> IFS aSource

Union of two IFS (probabilities are normalized if required when the IFS is drawn)

(<?>) :: Double -> IFS a -> IFS aSource

Multiply IFS probabilities

linearIFS :: M a -> IFS aSource

Create a linear IFS from an affine transformation