Skip to content

patrick22414/rewrite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rewrite

L-system implemented in Go with Ebitengine.

Demo

Fractal Plant / Barnsley Fern

BarnsleyFern.mov

Fractal / Binary Tree

BinaryTree.mov

Dragon Curve

DragonCurve.mov

Koch Curve

KochCurve.mov

Sierpinski Triangle

SierpinskiTriangle.mov

Code

  • system/ L-system interface and rewriting logic (see below), and a few examples.
  • render/ Renderer inferface with turtle graphics.
  • game/ Game engine logic.
  • main.go Entry point. Select examples here.
type System interface {
	Axioms() []rune
	Rule(r rune) []rune
}

type PathRenderer interface {
	Render(runes []rune) vector.Path
	AsyncRender(runes []rune, cancel <-chan struct{}) <-chan vector.Path
}