Iterated Function Systems Save

Iterated Function Systems fractals with OCaml.

Project README

Iterated Function Systems with OCaml

Fractals are images of infinite complexity, characterized by being "similar" to themselves in some sense at all scales of magnification.

Iterated function systems are a method of generating fractals using self-similarity. An IFS image is defined as being the sum of geometric transforms of itself. It turns out that simply specifying the transforms along with a weight for each transform is enough to determine the image.

How to use this code

In your shell

$ sudo apt install ocaml opam
$ opam init
$ opam install graphics
$ opam install ocamlfind
$ eval $(opam env)
$ ocaml
        OCaml version 4.11.1

# 

In your OCaml interpreter

# #use "ifs_fractals.ml";;
# draw barnsley 200000;;

Result

Barnsley Fern

Resources

This work was carried out during a functional programming course.

Some information about Iterated Function Systems (with the Barnsley Fern):

Alternatives

Open Source Agenda is not affiliated with "Iterated Function Systems" Project. README Source: cedricbonhomme/iterated-function-systems

Open Source Agenda Badge

Open Source Agenda Rating