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.

This is the release version of the Viewer, updated source code can be found in projects google code page.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.