3 ms·
When playing with a workshop for this [0], I found it hard to make real-looking trees. Especially when trying to color them, as the recursiveness doesn't really
by matsemann 7y ago
When playing with a workshop for this [0], I found it hard to make real-looking trees. Especially when trying to color them, as the recursiveness doesn't really care if you want it to be a branch or a trunk. I have experimented with checking the depth of the stack for the turtle, and using that to draw with a different color/strokweight. But still not sure how to make it look more like a real tree. [1] It's fun to experiment with, though!
The image is produced by
F: "FF",
X: "F+[[X]-FX]-F[F-FX]+X"
[0]: https://github.com/FredrikMeyer/lsystems-workshop https://github.com/FredrikMeyer/lsystems-workshop edit index.js#L102
[1]: https://imgur.com/a/1flZ2b8 https://imgur.com/a/1flZ2b8
- Sharlin 7y agoThat's where the context-sensitive part comes in, I believe.