-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Iterated Function System generation for Haskell -- -- Library to describe IFS and generate PPM pictures from the -- descriptions @package IFS @version 0.1.1 -- | Description -- -- Some geometry operations used by the IFS module Graphics.IFS.Geometry -- | Affine transform on 2x2 space data M a -- | Vector newtype V a V :: (a, a) -> V a -- | A pure non linear transformation type NonLinear a = V a -> V a -- | A non linear transformation with a pure non linear part and an affine -- one newtype NonLinearTransform a NL :: (NonLinear a, M a) -> NonLinearTransform a -- | Elements which can be transformed by an operator class Module a b (<*>) :: Module a b => a -> b -> b -- | Create a pure affine transformation Linear part: a b c d Affine part: -- e f linear :: Num a => a -> a -> a -> a -> a -> a -> M a rotation :: Double -> M Double scaling :: Double -> Double -> M Double translation :: Double -> Double -> M Double -- | Linear v0 :: NonLinear Double -- | Sinusoidal v1 :: NonLinear Double -- | Spherical v2 :: NonLinear Double -- | Swirl v3 :: NonLinear Double -- | Horseshoe v4 :: NonLinear Double -- | Polar v5 :: NonLinear Double -- | Handkerchief v6 :: NonLinear Double -- | Heart v7 :: NonLinear Double -- | Disc v8 :: NonLinear Double -- | Spiral v9 :: NonLinear Double -- | Hyperbolic v10 :: NonLinear Double -- | Diamond v11 :: NonLinear Double -- | Ex v12 :: NonLinear Double -- | Start vector used to initiate the generation of a random trajectory startVector :: V Double inv :: Fractional a => M a -> M a det :: Num a => M a -> a instance Eq a => Eq (V a) instance Show a => Show (V a) instance Eq a => Eq (M a) instance Show a => Show (M a) instance Num a => Module (NonLinear a) (NonLinearTransform a) instance Num a => Module (NonLinearTransform a) (V a) instance Num a => Module (M a) (V a) instance Num a => Module a (M a) instance Num a => Module a (V a) instance Num a => Num (V a) instance Num a => Num (M a) -- | Description -- -- Iterated Function Systems in Haskell module Graphics.IFS -- | 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. data IFS a -- | A position in an array of pixels and the color index type Pixel = (Int, Word8) -- | Draw an IFS drawIFS :: Int -> Int -> Int -> IFS Double -> [Pixel] -- | Union of two IFS (probabilities are normalized if required when the -- IFS is drawn) (<+>) :: IFS a -> IFS a -> IFS a -- | Multiply IFS probabilities () :: Double -> IFS a -> IFS a -- | Create a linear IFS from an affine transformation linearIFS :: M a -> IFS a instance Num a => Module a (IFS a) instance Fractional a => Module (M a) (IFS a) instance Num a => Module (NonLinear a) (IFS a) -- | Description -- -- Example IFS module Graphics.IFS.Examples sierpinski :: IFS Double square :: IFS Double fern :: IFS Double -- | Description -- -- Portable Pixel Map module Graphics.IFS.Ppm -- | RGB Color data Color RGB :: Word8 -> Word8 -> Word8 -> Color -- | Create a PPM picture. createPict :: String -> Int -> Int -> Int -> ColorizeFunction -> IFS Double -> IO () -- | Red color red :: Color -- | Gree color green :: Color -- | Blue color blue :: Color -- | white color white :: Color -- | Black color black :: Color -- | The type of a coloring functions. The first argument is an index value -- and the second argument is a list of RGB value. The function is -- assumed to concatenate a new triple of RGB value to the list type ColorizeFunction = Word8 -> [Word8] -> [Word8] -- | Binary coloring binaryColor :: Color -> Color -> Word8 -> [Word8] -> [Word8] -- | Density coloring with linear interpolation densityColor :: Int -> Color -> Color -> Word8 -> [Word8] -> [Word8] instance Eq Color instance Ord Color