/pyifs

An Iterated Function System in Python

Primary LanguagePythonMIT LicenseMIT

example IFS

An Iterated Function System in Python

This is a fork of James Tauber's initial work.

The tone-mapped image handling comes from Minilight.

NOTE: I strongly recommend using PyPy to run this (it runs about 40x faster)

Running

Just run

python pyifs.py [configuration file]

Configuration

The iterated function system is customizable by using a json configure file (example).

Writing New Transforms

A new subclass of Transform should randomize its parameters in __init__ then implement a transform method that takes two args (the x, y of the point) and returns a new x, y.

To-do

  • let evaluation of iterated function system be multithreaded
  • Check on why fern is not centered
  • Allow customization of image output (background, color schemes)
  • Make an easier input method? graphical?
  • add deterministic mode and allow for viewing of iterated steps

Examples

example IFS2 example IFS3 example IFS4