IFS-0.1: Iterated Function System generation for HaskellContentsIndex
Graphics.IFS.Examples
Portabilitynon-portable (multi-parameter type classes)
Stabilityexperimental
Maintainermisc@alpheccar.org
Contents
Example IFS
Example of use
Description

Description

Example IFS

Synopsis
sierpinski :: IFS Double
square :: IFS Double
fern :: IFS Double
Example IFS
sierpinski :: IFS Double
square :: IFS Double
fern :: IFS Double
Example of use
Generating the fractal for the Sierpinski IFS:
 createPict "essai.ppm" 600 600 1.0 200000 (binaryColor white blue) sierpinski
Combining square and sierpinski:
 createPict "essai.ppm" 600 600 1.0 200000 (binaryColor white blue) (0.5 <?> square <+> 0.5 <?> sierpinski)
Definitions of the examples:
 sierpinski :: IFS Double
 sierpinski =   0.33 <?> linearIFS (scaling 0.5 0.5)
           <+>  0.33 <?> linearIFS (translation 0.5 0 * scaling 0.5 0.5)    
           <+>  0.33 <?> linearIFS (translation 0 0.5 * scaling 0.5 0.5) 
 
 square :: IFS Double
 square =  0.25 <?> linearIFS (scaling 0.5 0.5) 
       <+> 0.25 <?> linearIFS (translation 0.5 0 * scaling 0.5 0.5) 
       <+> 0.25 <?> linearIFS (translation 0 0.5 * scaling 0.5 0.5) 
       <+> 0.25 <?> linearIFS (translation 0.5 0.5 * scaling 0.5 0.5) 
Produced by Haddock version 0.8