LSystems 2d Viewer
Latest project update includes 2d Viewer – it uses turtle graphics to render L-System (implementation is based on my previous post).
Viewer includes 2 examples – Tree (taken from L+C description) and Leaf.
Some changes were done in LSystems to be able to render 2d:
* Introduced Turtle namespace containing everything needed for turtle rendering, including Turtle.InterpretAttribbute which allowed to tag “interprtetation” methods.
* Added IRewritingRules interface which allows SystemDefintion to define rewriting rules (direction, depth, etc.).
* Some other small fixes and modifications.
It is also possible to open in the Viewer any C# file containing class or classes derived from LSystems.SystemDefinition or LSystems.Turtle.SystemDefinition (use “…” button to open a file). Opened file will be “watched” and source code will be reloaded (LSystem rebuilt) every time when file is modified. I took most of source code which compile an external file from this Phil Trelford’s post.