Skip to content

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

License

Notifications You must be signed in to change notification settings

two-twelve/fernery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fernery 🌿

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

Getting Started

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

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

stack exec -- fernery-exe -f barnsley

Leptosporangiate Fern

The transforms used in this fern were found here.

stack exec -- fernery-exe -f leptosporangiate -s '(210, -160)'

Thelypteridaceae Fern

The transforms used in this fern were found here.

stack exec -- fernery-exe -f thelypteridaceae -s '(-210, 125)'

The Sierpinski Gasket

stack exec -- fernery-exe -f sierpinskiGasket -o '(500,1000)' -s '(500,500)' -c 'PixelRGB8 0 0 0' -b 'PixelRGB8 255 255 255'

The Heighway Dragon

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

DavidLDewey Fractal

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'