Skip to content

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

Notifications You must be signed in to change notification settings

mikebharris/barnsley

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
}

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published