rewrite

command module
v0.0.0-...-2b4ce2b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

Rewrite

L-system implemented in Go with Ebitengine.

Demo

Fractal Plant / Barnsley Fern

https://github.com/patrick22414/rewrite/assets/32917395/e20cef6a-da43-4068-8189-9f3157a20d80

Fractal / Binary Tree

https://github.com/patrick22414/rewrite/assets/32917395/ea0245ea-b9ae-4a01-bd02-308c36333a8c

Dragon Curve

https://github.com/patrick22414/rewrite/assets/32917395/87489bc7-0081-4c14-bd14-d0e1f71d7b2e

Koch Curve

https://github.com/patrick22414/rewrite/assets/32917395/d40818ba-f136-4fcc-aedd-64889818f453

Sierpinski Triangle

https://github.com/patrick22414/rewrite/assets/32917395/9f844997-2665-401f-b805-8ef2576492fc

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
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL