A simple fractal image renderer
The code is based on Michael Bradshaw's Mandelbrot blog post, tweaked it for brevity and educational purposes. Finally I sharpened the contrast a bit. To find a nice contrast enhancing curve I used the awesome curve fitter of zunzun.com.
The idea is that it can show some of Haskell's features in a short program with a wonderfully complex output. Hopefully it is more suitable for introducing Haskell to newcomers then the fibonacci sequence and the quicksort algorithm.
Posting this project to Reddit resulted in some adjustments to the code, please find the details in the comments.
A fairly large rendering (10000 x 14142) is commited to this repository in PNG format. Have a look (17MB, sorry Github).
This code comes with a PDF version of the fractal rendering combined with the Haskell source code used to create it.
On a recent Haskell setup the following commands should be enough to build and run the code from a cabal sandbox:
cabal sandbox init cabal install ./.cabal-sandbox/bin/haskell-fractal
To make test renderings a
2000 should be enough, for a final rendering
width may be increased to something like
Finally ShareLatex chimed in to compile the PDF.