Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 508 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 508 Bytes

An implementation of the Barnsley Fern fractal algorithm in Go

Check out https://en.wikipedia.org/wiki/Barnsley_fern for details.

Run it with:

$ go run main.go > mynewfractal.png

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

package main

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

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