WPF, C#, Objective C and a little Math

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.

Categorised as: L-Systems, Turtle Graphics, WPF

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>