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
- Host: GitHub
- URL: https://github.com/mikebharris/barnsley
- Owner: mikebharris
- Created: 2022-09-06T08:10:12.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-25T17:47:47.000Z (over 2 years ago)
- Last Synced: 2025-03-13T01:36:45.925Z (3 months ago)
- Topics: fractal, fractal-algorithms, fractal-fern, ifs
- Language: JavaScript
- Homepage:
- Size: 708 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.
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 mainimport (
"github.com/mikebharris/barnsley/fern"
"image/gif"
"os"
)func main() {
gif.Encode(os.Stdout, fern.GenerateBarnsleyFern(240, 320, 100000), nil)
}
```