A CLI tool for generating images of ferns and other Iterated Function Systems.
Install stack, then:
git clone [email protected]:TheTeaCat/fernery.git
cd fernery
stack build
stack exec fernery-exe
This should generate an image of a Barnsley fern at ./fern.png by default, with colours reminiscent of an Anna Atkins cyanotype.
Various options are available to customise the appearance of the ferns. To see the supported options, do:
stack exec -- fernery-exe --help
This list of examples is currently exhaustive of the IFSs provided in Fernery, but I'd love to see more added to this little CLI tool. PRs are welcome! 🧑🎨
- Barnsley Fern
- Leptosporangiate Fern
- Thelypteridaceae Fern
- The Sierpinski Gasket
- The Heighway Dragon
- DavidLDewey Fractal
stack exec -- fernery-exe -f barnsley
The transforms used in this fern were found here.
stack exec -- fernery-exe -f leptosporangiate -s '(210, -160)'
The transforms used in this fern were found here.
stack exec -- fernery-exe -f thelypteridaceae -s '(-210, 125)'
stack exec -- fernery-exe -f sierpinskiGasket -o '(500,1000)' -s '(500,500)' -c 'PixelRGB8 0 0 0' -b 'PixelRGB8 255 255 255'
stack exec -- fernery-exe -f heighwayDragon -o '(250,400)' -d '(1000, 800)' -s '(500,500)' -c 'PixelRGB8 0 0 0' -b 'PixelRGB8 255 255 255' -i 10000000
The transforms used to generate this fractal are from an old worksheet authored by David L. Dewey which can be found here.
stack exec -- fernery-exe -f davidLDewey -s '(3,3)' -o '(850,500)' -d '(1700,1000)' -b 'PixelRGB8 255 255 255' -c 'PixelRGB8 0 0 0'