An open API service indexing awesome lists of open source software.

https://github.com/mikebharris/barnsley

The Barnsley Fern: an iterated function system fractal that brings nature to your screen
https://github.com/mikebharris/barnsley

fractal fractal-algorithms fractal-fern ifs

Last synced: 3 months ago
JSON representation

The Barnsley Fern: an iterated function system fractal that brings nature to your screen

Awesome Lists containing this project

README

        

# An implementation of the Barnsley Fern fractal algorithm in Go
Check out [https://en.wikipedia.org/wiki/Barnsley_fern](https://en.wikipedia.org/wiki/Barnsley_fern) for details.

![](barnsley.png)

Run it with:
```shell
$ go run main.go > mynewfractal.png
```

Or use it in your own Go program, say to produce a gif, with:
```go
package main

import (
"github.com/mikebharris/barnsley/fern"
"image/gif"
"os"
)

func main() {
gif.Encode(os.Stdout, fern.GenerateBarnsleyFern(240, 320, 100000), nil)
}
```