Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/resetius/lsystem
L-System Fractal Generator
https://github.com/resetius/lsystem
Last synced: 17 days ago
JSON representation
L-System Fractal Generator
- Host: GitHub
- URL: https://github.com/resetius/lsystem
- Owner: resetius
- License: bsd-3-clause
- Created: 2021-02-22T17:41:31.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-03T22:56:25.000Z (about 1 year ago)
- Last Synced: 2024-10-16T15:43:47.218Z (2 months ago)
- Language: LiveScript
- Size: 247 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lsystem
[L-System Fractal Generator](https://en.wikipedia.org/wiki/L-system)This program was inspired by [FractInt](http://fractint.oblivion.cz) pictures and written by me in 2008. Current version (2021) was rewritten in C language and stripped of old/unused/broken code.
# build
```
$ cmake ${source-dir}
$ make
```
# run
```
$ lsystem -f ${source-dir}/fractals/snoppy.ls
....
building Snow.Flake.2
using order 4
lsystem done
turtle done
normilize done
saving done
building Snow.Flake.3
using order 5
lsystem done
turtle done
normilize done
saving done
building Snow.Flake.4
using order 12
lsystem done
turtle done
normilize done
saving done
building Twelve.Stones
using order 27
lsystem done
turtle done
normilize done
saving done
```
# syntax```
fractal_name { fractal_description }
```
Fractal with name 'fractal_name' will be saved to 'fractal_name.png'.Fractal description parameters:
| name | description |
| ------------- | --------------------------------------------- |
| alpha | initial angle |
| theta | angle increment in radians |
| angle | angle increment in degree |
| axiom | sets axiom |
| + or - | increment or decrement angle on theta radians |
| ! | swaps + and - |
| [ and ] | branch |
| F or D | draw forward |
| G or M. | skip forward |
| Cnumber | sets current color to number |
| >number | increases color by number |
|