IFS-0.1.1: Iterated Function System generation for Haskell

Portabilitynon-portable (multi-parameter type classes)
Stabilityexperimental
Maintainermisc@alpheccar.org

Graphics.IFS.Examples

Contents

Description

Description

Example IFS

Synopsis

Example IFS

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)