L-System Aristid Lindenmayer (1968), biologist. L-System A method of constructing a FRACTAL that is also a MODEL for plant growth. The Computational Beauty.

Slides:



Advertisements
Similar presentations
L ECTURE 3 T HEORY OF AUTOMATA. E QUIVALENT R EGULAR E XPRESSIONS Definition Two regular expressions are said to be equivalent if they generate the same.
Advertisements

Natural Language Processing - Formal Language - (formal) Language (formal) Grammar.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
Dept. of Computer Science & IT, FUUAST Automata Theory 2 Automata Theory VII.
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
Chapter Chapter Summary Languages and Grammars Finite-State Machines with Output Finite-State Machines with No Output Language Recognition Turing.
Regular Grammars Formal definition of a regular expression.
L systems (Aristid Lindenmayer)
CS5371 Theory of Computation
L-systems Presented by Luv Kohli COMP258 October 30, 2002 Images copyright © 1992 D. Fowler, P. Prusinkiewicz, and J. Battjes.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.1: Context-Free Grammars) David Martin With some.
79 Regular Expression Regular expressions over an alphabet  are defined recursively as follows. (1) Ø, which denotes the empty set, is a regular expression.
Key to Homework #2 1. What is the language of L-system G = ({a, b, c}, h, acb ), where the rewriting rule h is defined as follows: h (a) = aa h (b) = cb.
Chapter 3: Formal Translation Models
LANGUAGE AND GRAMMARS © University of LiverpoolCOMP 319slide 1.
IlliDOL: A Framework for Exploration of L- Systems in Three Dimensions Vilas Dhar Math 198 Spring 2003.
Problem of the DAY Create a regular context-free grammar that generates L= {w  {a,b}* : the number of a’s in w is not divisible by 3} Hint: start by designing.
Dragon Curve Drawn in Project 4… How to generate the string of drawing commands? How does the dragon curve come about? 1.
Compiler Construction 1. Objectives Given a context-free grammar, G, and the grammar- independent functions for a recursive-descent parser, complete the.
Formal Grammars Denning, Sections 3.3 to 3.6. Formal Grammar, Defined A formal grammar G is a four-tuple G = (N,T,P,  ), where N is a finite nonempty.
Lecture 16 Oct 18 Context-Free Languages (CFL) - basic definitions Examples.
Introduction Syntax: form of a sentence (is it valid) Semantics: meaning of a sentence Valid: the frog writes neatly Invalid: swims quickly mathematics.
::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15.
CONVERTING TO CHOMSKY NORMAL FORM
Lecture # 1 (Automata Theory)
L-Systems and Procedural Plants CSE 3541 Matt Boggus.
The Artificial Life of Plants Przemyslaw Prusinkiewicz, Mark Hammel, Radom´ır Mˇech Department of Computer Science University of Calgary Calgary, Alberta,
Examining the World of Fractals. Myles Akeem Singleton Central Illinois Chapter National BDPA Technology Conference 2006 Los-Angeles, CA.
A sentence (S) is composed of a noun phrase (NP) and a verb phrase (VP). A noun phrase may be composed of a determiner (D/DET) and a noun (N). A noun phrase.
Grammars CPSC 5135.
Languages & Grammars. Grammars  A set of rules which govern the structure of a language Fritz Fritz The dog The dog ate ate left left.
Summer School „Modelling and Simulation with GroIMP“ / Tutorial for beginners University of Göttingen (Germany), September, 2010 Winfried Kurth Some.
Lindenmayer systems Martijn van den Heuvel May 26th, May 26th, 2011.
Evolutionary Robotics Using A Formal Grammar To Evolve Robot Bodies and Brains Hornby, G.S., Pollack, J. (2001) Creating high-level components with a generative.
How to Draw a Tree L-Systems in Computer Graphics Steven Janke.
Module 2 How to design Computer Language Huma Ayub Software Construction Lecture 8.
CS 461 – Sept. 19 Last word on finite automata… –Scanning tokens in a compiler –How do we implement a “state” ? Chapter 2 introduces the 2 nd model of.
Regular Grammars Chapter 7. Regular Grammars A regular grammar G is a quadruple (V, , R, S), where: ● V is the rule alphabet, which contains nonterminals.
Grammar G = (V N, V T, P, S) –V N : Nonterminal symbols –V T : Terminal symbols V N  V T = , V N ∪ V T = V – P : a finite set of production rules α 
CMSC 330: Organization of Programming Languages Context-Free Grammars.
Parsing Introduction Syntactic Analysis I. Parsing Introduction 2 The Role of the Parser The Syntactic Analyzer, or Parser, is the heart of the front.
Midterm 1 Breakdown >79 3 >29 7 >69 5 >19 5 >59 7 >49 9 >39 7.
Regular Grammars Chapter 7 1. Regular Grammars A regular grammar G is a quadruple (V, , R, S), where: ● V is the rule alphabet, which contains nonterminals.
LINDFERN Lindenmayer Systems in VPython Nick Langhammer.
Enter Chomsky Grammars. 2 What has Chomsky* to do with computing? Linguistics and computing intersect at various places: Things that are used to create.
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
1 Simplification of Context-Free Grammars Some useful substitution rules. Removing useless productions. Removing -productions. Removing unit-productions.
CS 3240 – Chapter 5. LanguageMachineGrammar RegularFinite AutomatonRegular Expression, Regular Grammar Context-FreePushdown AutomatonContext-Free Grammar.
Banff 2007: Innovations in Mathematics Education via the Arts Interactive Graphics Tools and Global Learning Mara Alagic & Glyn Rimmington Wichita State.
CSC312 Automata Theory Lecture # 3 Languages-II. Formal Language A formal language is a set of words—that is, strings of symbols drawn from a common alphabet.
Grammars A grammar is a 4-tuple G = (V, T, P, S) where 1)V is a set of nonterminal symbols (also called variables or syntactic categories) 2)T is a finite.
Introduction Finite Automata accept all regular languages and only regular languages Even very simple languages are non regular (  = {a,b}): - {a n b.
Experimenting with Grammars to Generate L-Systems October 29, 2007
CSC312 Automata Theory Lecture # 26 Chapter # 12 by Cohen Context Free Grammars.
Regular Grammars Reading: 3.3. What we know so far…  FSA = Regular Language  Regular Expression describes a Regular Language  Every Regular Language.
Formal Languages and Grammars
Mathematical Foundations of Computer Science Chapter 3: Regular Languages and Regular Grammars.
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
Week 14 - Friday.  What did we talk about last time?  Simplifying FSAs  Quotient automata.
Experimenting with Grammars to Generate L-Systems – in JFLAP March 31, 2011 Prof. Susan Rodger Computer Science Dept.
Grammars, L-Systems Jim Whitehead UC Santa Cruz School of Engineering courses.soe.ucsc.edu/courses/cmps265/Spring14/01 23 Apr 2014.
Chapter 2. Formal Languages Dept. of Computer Engineering, Hansung University, Sung-Dong Kim.
Describing Syntax and Semantics Chapter 3: Describing Syntax and Semantics Lectures # 6.
BCT 2083 DISCRETE STRUCTURE AND APPLICATIONS
Regular Languages, Regular Operations, Closure
L-systems L-systems are grammatical systems introduced by Lyndenmayer to describe biological developments such as the growth of plants and cellular organisms.
Natural Language Processing - Formal Language -
Chapter 7 Regular Grammars
CSC312 Automata Theory Lecture # 3 Languages-II.
Presentation transcript:

L-System Aristid Lindenmayer (1968), biologist

L-System A method of constructing a FRACTAL that is also a MODEL for plant growth. The Computational Beauty of Nature – Gary William Flake

Fractal graphics

Plant model

L-System L-systems use an AXIOM as a starting STRING and ITERATIVELY apply a set of PARALLEL string substitution rules to yield one long string that can be used as instructions for drawing the fractal.

Production systems String : concatenation of alphabets (symbols). Axiom : the first initial symbol(s). Production rules : the description of how one string of symbols generate another.

An example Alphabets: a, b Axiom: b Rules: a -> ab b -> a

Test the generation StepResult 0b 1a 2ab 3aba 4abaab 5abaababa 6abaababaabaab

Another example Alphabets: a, b Axiom: b Rules: a -> ba b -> ab

Test the generation StepResult 0b 1ab 2baab 3abbabaab 4baababbaabbabaab

Terminal and non-terminal symbols We can use lower and UPPER case alphabets to represent the terminal and non-terminal symbols. Terminal symbols are those need no further expansion. Non-terminal symbols are those can further expand using the production rules.

Terminal and non-terminal symbols Rules: A -> b A -> bA In this case, A is a non-terminal symbol; b is a terminal symbol. The rules state that A can generate b and stop. A can also expand to bA where the A on the right hand side can expand again using the two rules.

Terminal and non-terminal symbols Rules: A -> b (terminal) A -> bA (non-terminal) The results will be, b, bb, bbb, bbbb, … Remember the regular expression last time, bb*

Exercise time Alphabets: A, a, b Axiom: A Rules: A -> ab (terminal) A -> aAb (non-terminal) Let’s see what can be generated.

Answer StepResult 0AA 1abaAb 2aabbaaAbb 3aaabbbaaaAbbb 4aaaabbbbaaaaAbbbb 5aaaaabbbbbaaaaaAbbbbb

Language Remember that the Finite State Automata can generate a language we called Regular Expression. The L-system can also generate another language we named Context-Free language.

Language According to Noam Chomsky, there are 4 types/hierarchies of Formal Language. We have learnt the, Regular expression, Context-free language. There are two more, namely the, Context-sensitive language, Unrestricted language.

Production rules Regular expression uses the rules, A -> b or A -> bC; While Context-Free language uses the rules like, A -> α; where α is any string of both terminal and non- terminal symbols.

Simple exercise Alphabets: F, -, + Axiom: F Rules: F -> F + F - - F + F We have only one production rule with the symbol F. Let’s see what happens.

Any meaning? We have not touched on any ideas about meaning – semantics yet. The language we generated is pure syntactic. We can, however, assign external meaning to the symbols and see what happens.

Any meaning?

The meaning Now we assign meaning to the symbols. F: draw a line segment forward +: turn anti-clockwise 60° -: turn clockwise 60 ° The rule F -> F + F - - F + F will become:

The meaning F F F F

Turtle graphics That is the Turtle Graphics (Logo) we learnt in primary school. The commands are, CommandTurtle action FDraw forward by a fixed length. fMove forward by a fixed length. +Turn anti-clockwise by a fixed angle. -Turn clockwise by a fixed angle. [Save the current location and orientation. ]Restore the last saved location and orientation.

L-system applet Try to create the graphics using the applet at

Exercise time Can you figure out the rule for this plant?