Skip to content

two-twelve/fernery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Fernery 🌿

A CLI tool for generating images of ferns and other Iterated Function Systems.

Getting Started

Fernery is available to install from our Homebrew Tap.

brew tap two-twelve/tap
brew install fernery
fernery

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:

fernery --help

You can also build and run Fernery with stack:

git clone git@github.com:TheTeaCat/fernery.git
cd fernery
stack build
stack exec fernery-exe

Fractal Tees πŸ›

A selection of images generated using Fernery are available printed on T-shirts and tote bags at fractaltees.shop.

Example Images

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

fernery -f barnsley

Leptosporangiate Fern

The transforms used in this fern were found here.

fernery -f leptosporangiate -s '(210, -160)'

Thelypteridaceae Fern

The transforms used in this fern were found here.

fernery -f thelypteridaceae -s '(-210, 125)'

The Sierpinski Gasket

fernery -f sierpinskiGasket -o '(500,1000)' -s '(500,500)' -c 'PixelRGBA8 0 0 0 255' -b 'PixelRGBA8 255 255 255 255'

The Sierpinski Carpet

fernery -f sierpinskiCarpet -o '(50,50)' -s '(900,900)' -i 10000000 -c 'PixelRGBA8 255 255 255 255' -b 'PixelRGBA8 114 47 55 255' 

The Sierpinski Pentagon

fernery -f sierpinskiPentagon -o '(250,875)' -s '(500,500)' -b 'PixelRGBA8 135 206 235 255' -c 'PixelRGBA8 0 0 0 255'

The Levy Dragon

fernery -f levyDragon -o '(275,250)' -s '(450,450)' -d '(1000,800)' -b 'PixelRGBA8 251 206 177 255' -c 'PixelRGBA8 0 0 0 255'

The Heighway Dragon

fernery -f heighwayDragon -o '(250,500)' -d '(1000, 800)' -s '(600,600)' -c 'PixelRGBA8 0 0 0 255' -b 'PixelRGBA8 255 255 255 255' -i 2000000

McWorter's Pentigree

fernery -f mcWortersPentigree -o '(130,330)' -s '(800,800)' -b 'PixelRGBA8 202 231 193 255' -c 'PixelRGBA8 0 0 0 255'

The Koch Curve

fernery -f kochCurve -s '(900,-900)' -o '(50,450)' -d '(1000,600)' -b 'PixelRGBA8 120 81 169 255'

The Koch Snowflake

fernery -f kochSnowflake -o '(500,500)' -s '(450,450)' -b 'PixelRGBA8 220 243 255 255' -c 'PixelRGBA8 57 109 124 255'

DavidLDewey Fractal

The transforms used to generate this fractal are from an old worksheet authored by David L. Dewey which can be found here.

fernery -f davidLDewey -s '(3,3)' -o '(850,500)' -d '(1700,1000)' -b 'PixelRGBA8 255 255 255 255' -c 'PixelRGBA8 0 0 0 255'

Tree Fractal

This fractal can also be found on Peter E. Francis' IFS Fractals.

fernery -f treeFractal -o '(50,950)' -s '(900,-900)' -c 'PixelRGBA8 0 0 0 255' -b 'PixelRGBA8 255 255 255 255'

Acknowledgements

The following have been useful sources of Iterative Function Systems to add to Fernery: