Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nylki/lindenmayer
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom committed Jun 25, 2019
2 parents f2f6271 + b095d44 commit 90280de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ let kochcurve = new LSystem({
// Iterate the L-System two times and log the result.
let result = kochcurve.iterate(2)
console.log(result)
//'F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F'
//'F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F++F
//-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F++F-F++F-F-F-F++F-F'
```

There are multiple ways to set productions, including javascript functions:
Expand Down Expand Up @@ -103,7 +104,8 @@ lsystem.setProduction('B', (info) => (info.currentAxiom.length / 2) <= info.inde


# Documentation
The following section is a quick overview. The full API docs can be found [here](https://github.com/nylki/lindenmayer/blob/master/docs/index.md).
The following section is a quick overview. Please refer to the [full documentation](https://github.com/nylki/lindenmayer/blob/master/docs/index.md) for a detailed usage reference.

## Initialization

```.js
Expand Down Expand Up @@ -331,3 +333,5 @@ let parametricLsystem = new lsys.LSystem({
```

As you can see above, you need to explicitly define the `symbol` value, so the correct production can be applied.

[Full Documentation](https://github.com/nylki/lindenmayer/blob/master/docs/index.md)
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ default: `true`.

- `branchSymbols`: A String tuple of the symbols treated as branches. default: `'[]'`

- `ignoredSymbols`: A String of symbols to ignore when performing context sensitive checks. Eg. you may want to define `+-` in two-dimensional turtle-graphic L-Systems to be ignored. default: `''`.
- `ignoredSymbols`: A String of symbols to ignore when performing context sensitive checks. Eg. you may want to define `+-` in two-dimensional turtle-graphic L-Systems to be ignored. default: `'+-&^/|\\'`.

- `forceObjects`: Toggles automatic conversion of Strings into Objects. Eg. axiom 'AB' gets converted to [{symbol: 'A'}, {symbol: 'B'}]. default: `false`.
- `forceObjects`: Toggles automatic conversion of Strings into Objects. Eg. axiom `'AB'` gets converted to `[{symbol: 'A'}, {symbol: 'B'}]`. default: `false`.



Expand Down

0 comments on commit 90280de

Please sign in to comment.