Project Description
This is a three-liner demo program that leverages a grammar-based approach to picture generation. It does not contain the "Line Drawing Language" itself.

Here is the gist of it:

Grid Viewer;
TextBox Program;
Program.Text = "r * d * d * r * u * l";
void Program_TextChanged()
{
    Canvas c = LineDrawingLanguage.Compile(Program.Text);
    Viewer.Children.Clear();
    Viewer.Children.Add(c);
}
Which gives:

simple.png

Q1 Why would anybody do such a silly thing? After all, it just displays primitive lines that could be drawn (programmatically or otherwise) by other means.
A1.1 The primary interest here is the usage of Oslo's MGrammar to define and compose line drawings.
A1.2 "Grammatical Picture Generation" is a concept that is past its due time (see Inspiration).

Q2 Why all those asterisks? It could be: "rddrul".
A2 asterisk is just the concatenation operator; orther operators (such as union, translation, rotation) are in incubation.

By the way, for now, "no operator" is union:

SomeGrid.png

Inspiration
This project is inspired by the book:
Grammatical Picture Generation: A Tree-Based Approach
by Frank Drewes
ISBN: 354021304
Mr. Drewes Site

Dependencies
Consisting of only the sources of the demo program, this project depends on the LineDrawingLanguage.dll which is available here (in Downloads) in binary form only.

Last edited May 18, 2009 at 10:58 AM by Ceyhun, version 26