https://github.com/spaxe/elm-lsystem
Implementation of L-Systems in Elm
https://github.com/spaxe/elm-lsystem
elm generative l-system package svg turtle-graphics
Last synced: 5 months ago
JSON representation
Implementation of L-Systems in Elm
- Host: GitHub
- URL: https://github.com/spaxe/elm-lsystem
- Owner: Spaxe
- License: mit
- Created: 2018-05-13T13:37:08.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-24T00:31:35.000Z (about 7 years ago)
- Last Synced: 2023-08-08T20:40:14.634Z (almost 3 years ago)
- Topics: elm, generative, l-system, package, svg, turtle-graphics
- Language: Elm
- Size: 13.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-LSystem
Implementation of L-Systems in Elm. Given a set of states and a ruleset:
type State
= A
| B
rule : LSystem.Rule State
rule state =
case state of
A ->
[ A, B ]
B ->
[ A ]
We can generate a new state based on these:
`[A]` => `[A, B]`
`[A, B]` => `[A, B, A]`
`[A, B, A]` => `[A, B, A, A, B]`
# Install
elm install Spaxe/elm-lsystem
# Documentation
See the documentation on elm docs at http://package.elm-lang.org/packages/Spaxe/elm-lsystem/latest/LSystem