Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henrinormak/lindenmayer
A Swift playground exploring Lindemayer systems
https://github.com/henrinormak/lindenmayer
Last synced: 3 months ago
JSON representation
A Swift playground exploring Lindemayer systems
- Host: GitHub
- URL: https://github.com/henrinormak/lindenmayer
- Owner: henrinormak
- Created: 2015-03-22T14:25:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-22T18:17:23.000Z (almost 8 years ago)
- Last Synced: 2024-04-27T23:33:50.350Z (6 months ago)
- Language: Swift
- Size: 14.6 KB
- Stars: 11
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- Awesome-Swift-Playgrounds - Lindenmayer Systems - A Swift playground exploring Lindemayer systems. (Mathematics / SpriteKit)
README
# Lindenmayer Playground
Inspired by the [Mandelbrot playground](https://developer.apple.com/swift/blog/?id=26) released by the Swift development team, this playground features [Lindenmayer systems](http://en.wikipedia.org/wiki/L-system), better known as L-Systems.
According to Wikipedia, *An L-system or Lindenmayer system is a parallel rewriting system and a type of formal grammar.* In this playground you can try out rendering various predefined systems or define your own. The Lindenmayer struct used to define a rule set allows for the basic operators, drawing, moving, turning and grouping.
For more information, look at the sources attached to the main playground.
All examples of systems come from Wikipedia.Author: Henri Normak - [@henrinormak](https://twitter.com/henrinormak)
## Future work
It might be interesting to expand this to include stochastic rules and make it more applicable for rendering trees and plants as described in [The Algorithmic Beauty of Plants](http://algorithmicbotany.org/papers/abop/abop.pdf). It would also be cool to have a way of evaluating expressions within replacement rules, such as "Move forward 0.2 of previous unit size". Similarly, it would also be interesting to allow more customisation in terms of colours of specific lines etc, not only would that allow more interesting visualisation, it would also help people understand how the rules are evaluated.