Portability | non-portable (multi-parameter type classes) |
---|---|
Stability | experimental |
Maintainer | misc@alpheccar.org |
Description
Example IFS
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)