Giter Site home page Giter Site logo

two-twelve / fernery Goto Github PK

View Code? Open in Web Editor NEW
48.0 2.0 2.0 718 KB

A CLI tool for generating images of ferns ๐ŸŒฟ and other Iterated Function Systems

License: MIT License

Haskell 100.00%
barnsley-fern cli cli-app cli-tool fractal fractal-generators fractal-images fractal-rendering fractals haskell

fernery's Introduction

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

Installing with Homebrew (macOS)

Fernery is also available to install from our Homebrew Tap.

brew tap two-twelve/tap
brew install fernery
fernery --help

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

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 'PixelRGBA8 0 0 0 255' -b 'PixelRGBA8 255 255 255 255'

The Sierpinski Carpet

stack exec -- fernery-exe -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

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

The Levy Dragon

stack exec -- fernery-exe -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

stack exec -- fernery-exe -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

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

The Koch Curve

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

The Koch Snowflake

stack exec -- fernery-exe -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.

stack exec -- fernery-exe -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.

stack exec -- fernery-exe -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:

fernery's People

Contributors

freddyheppell avatar theteacat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

connrs bocazagp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.