Jason Stredwick, MSU 2004 L-Systems Lindenmayer Systems algorithmicbotany.org.

Slides:



Advertisements
Similar presentations
Automata Theory December 2001 NPDAPart 3:. 2 NPDA example Example: a calculator for Reverse Polish expressions Infix expressions like: a + log((b + c)/d)
Advertisements

Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.
Chapter 11 :: Logic Languages
A question from last class: construct the predictive parsing table for this grammar: S->i E t S e S | i E t S | a E -> B.
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
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.
Procedural Content Generation James Grisetti. Overview Introduction Brief History of Procedural Generation Basic Generators Contemporary Generators Future.
L systems (Aristid Lindenmayer)
L-systems Presented by Luv Kohli COMP258 October 30, 2002 Images copyright © 1992 D. Fowler, P. Prusinkiewicz, and J. Battjes.
Procedural Modeling L-Systems Procedural Terrain Procedural Behavior Based on the slides from Spring 2007.
Simulating Trees with Fractals and L-Systems Eric M. Upchurch CS 579.
January 14, 2015CS21 Lecture 51 CS21 Decidability and Tractability Lecture 5 January 14, 2015.
Lindenmayer Systems . Lindenmayer systems There is no distinction between terminal and non-terminal symbols. All the words derived from a given word.
LANGUAGE AND GRAMMARS © University of LiverpoolCOMP 319slide 1.
Finite State Machines Data Structures and Algorithms for Information Processing 1.
From Extropians to Evolutionary Robotics Simon D. Levy PHIL April 2013 What Machines (Don't) Tell Us About (Trans)Human Nature.
Morphogenesis and Lindenmayer Systems (L-systems) Gabriela Ochoa
Morphogenesis, Lindenmayer Systems and Generative Encodings Gabriela Ochoa
IlliDOL: A Framework for Exploration of L- Systems in Three Dimensions Vilas Dhar Math 198 Spring 2003.
Computing & Information Sciences Kansas State University Lecture 37 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 37 of 42 Monday, 28 April.
1 Introduction to Parsing Lecture 5. 2 Outline Regular languages revisited Parser overview Context-free grammars (CFG’s) Derivations.
Pushdown Automata.
1 Local search and optimization Local search= use single current state and move to neighboring states. Advantages: –Use very little memory –Find often.
CMPS 3223 Theory of Computation
Evolving Scalable Soft Robots Senior Thesis Presentation Ben Berger Advisor: John Rieffel.
L-Systems and Procedural Plants CSE 3541 Matt Boggus.
College of Computer and Information Science, Northeastern UniversityOctober 13, CS U540 Computer Graphics Prof. Harriet Fell Spring 2007 Lecture.
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.
L-Systems Lindenmayer Systems Prusinkiewicz and Lindenmayer
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.
L-system and SVG 2D SVG Tree 2002/10/16.
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.
1 Chapter 13 Artificial Life: Learning through Emergent Behavior.
1 10/27/ :26 UML Simplicity in Complexity. 2 10/27/ :26 UML Rewriting Systems Classic Example: Koch 1905 Initiator Generator.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Special Models.
Block diagram reduction
Banff 2007: Innovations in Mathematics Education via the Arts Interactive Graphics Tools and Global Learning Mara Alagic & Glyn Rimmington Wichita State.
Cellular Automata Martijn van den Heuvel Models of Computation June 21st, 2011.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
PushDown Automata. What is a stack? A stack is a Last In First Out data structure where I only have access to the last element inserted in the stack.
Emergent Design Martin HembergImperial College2004Emergent Design.
제 6 주. 응용 -2: Graphics Evolving L-systems to Generate Virtual Creatures G.S. Hornby and J.B. Pollack, Computers & Graphics, vol. 25, pp. 1041~1048, 2001.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
1 Representation and Evolution of Lego-based Assemblies Maxim Peysakhov William C. Regli ( Drexel University) Authors: {umpeysak,
using Deterministic Finite Automata & Nondeterministic Finite Automata
Grammar Set of variables Set of terminal symbols Start variable Set of Production rules.
1 Chapter Pushdown Automata. 2 Section 12.2 Pushdown Automata A pushdown automaton (PDA) is a finite automaton with a stack that has stack operations.
Akram Salah ISSR Basic Concepts Languages Grammar Automata (Automaton)
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis (Winter 2016, these slides were also used for Day 33)
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 3 – Describing Syntax CSCE 343. Syntax vs. Semantics Syntax: The form or structure of the expressions, statements, and program units. Semantics:
Lecture 17: Theory of Automata:2014 Context Free Grammars.
Formal Languages, Automata and Models of Computation
Pushdown Automata.
G. Pullaiah College of Engineering and Technology
Table-driven parsing Parsing performed by a finite state machine.
L-systems L-systems are grammatical systems introduced by Lyndenmayer to describe biological developments such as the growth of plants and cellular organisms.
Context free grammar.
PDAs Accept Context-Free Languages
PART II STACK APPLICATIONS
Representation and Evolution of Lego-based Assemblies
Compiler Design 7. Top-Down Table-Driven Parsing
Intro to Data Structures
… NPDAs continued.
Induction II: Inductive Pictures
Presentation transcript:

Jason Stredwick, MSU 2004 L-Systems Lindenmayer Systems algorithmicbotany.org

Jason Stredwick, MSU 2004 L-System Overview Goals (Plant modeling) –Structural –Developmental –Chemical Parallel replacement grammar Representative of multicellular growth

Jason Stredwick, MSU 2004 Overview Continued Other types of parallel replacement systems –Open polygon by Koch –Cellular automata by Wolfram –Game of Life by Conway L-System grammar interpretations –LOGO (graphical modeling of plants) –Pure math –Jordan Pollack’s Golem project

Jason Stredwick, MSU 2004 D0L-System Notation 0 stands for context free D stands for deterministic V is the alphabet V * is the set of all words over V V + is V * excluding the empty word  is the word in V + that is the seed of the system, called the axiom P is the set of production rules, explained later 0L-System is defined as G=

Jason Stredwick, MSU 2004 D0L-System Product Rules Production rule is defined as P  V x V * Alternate notation ( ,  ) or     is called the predecessor  is called the successor  can only be a single character  can be any word, which includes letters If no production rule is given for a predecessor, it is assumed to be   

Jason Stredwick, MSU 2004 Determinism A system is considered deterministic if and only if for each predecessor, , there exists exactly one production rule, or more simply each letter in the alphabet can map to exactly one word in V *.

Jason Stredwick, MSU 2004 Example: D0L-System Alphabet:{a,b} Words:{a,b,ab} Production Rules: a  ab b  a  (seed):b Recursion Depth5 String Depth b0 a1 ab2 aba3 abaab4 abaababa5

Jason Stredwick, MSU 2004 LOGO Language Used to graphically model plants F move forward while drawing a line f move forward without drawing a line + rotate left - rotate right 3-D instructions are also available, using Euler rotations

Jason Stredwick, MSU 2004 n = 4  = 90   = -F P: F  F+F-F-F+F n = 2  = 90   = F-F-F-F P: F  F+FF-FF-F-F+F+F

Jason Stredwick, MSU 2004 n = 2  = 90   = F+F+F+F P: F  F+f-FF+F+FF+Ff+FF-f+FF-F-FF-Ff-FFF f  ffffff

Jason Stredwick, MSU 2004 Context Sensitive L-System Non-deterministic Types: 1, 2, and I, written 2L-System Uses neighbor information as a condition to use a production rule > Right of predecessor < Left of predecessor Example: 1.  > F   Type F   Type F F+F   Type I

Jason Stredwick, MSU 2004 Context Sensitive Example Signal Propagation  :baaaaa p1:b < a  b p2: b  a baaaaa abaaaa aabaaa aaabaa aaaaba aaaaab aaaaaa

Jason Stredwick, MSU 2004 Non-deterministic Each predecessor,  –Multiple production rules –Each rule has a probability of use –Probabilities must sum to one Example:   F   FF   FFF Stochastic L-System

Jason Stredwick, MSU 2004 Bracketed L-System [ push current state onto a stack ] pop current state onto a stack Used to create tree like structures

Jason Stredwick, MSU 2004 n = 5  = 25.7   = F P: F  F[+F]F [-F]F n = 5  = 20   = F P: F  F[+F]F [-F][F] n = 4  = 22.5   = F P: F  FF-[-F+F+F]+ [+F-F-F]

Jason Stredwick, MSU 2004 n = 7  = 20   = X P: F  FF X  F[+X]F[-X]+X n = 7  = 25.7   = X P: F  FF X  F[+X][-X]FX n = 5  = 22.5   = X P: F  FF X  F-[[X]+X]+F [+FX]-X

Jason Stredwick, MSU 2004

Parameterized L-System V is the alphabet  is the set of formal parameters, , real numbers  is the axiom, seed, (V x  * ) + E(  ) represent math operations C(  ) represent logic operations, conditional  is the predecessor, (V x  * )  is the successor, (V x E(  )) * P   x C(  ) x  G = defines a parametric 0L-System

Jason Stredwick, MSU 2004 Parameterized 0L-System Example  : B(2)A(4,4) p1:A(x,y) : y<=3  A(x*2, x+y) p2:A(x,y) : y>3  B(x)A(x/y, 0) p3:B(x) : x<1  C p4:B(x) : x>=1  B(x-1) B(2)A(4,4) B(1)B(4)A(1,0) B(0)B(3)A(2,1) CB(2)A(4,3) CB(1)A(8,7) CB(0)B(8)A(1,0)

Jason Stredwick, MSU 2004

Hornby/Pollack Multiple applications Considers there system generic by simply replacing the alphabet. Uses Parameterized Bracketed D0L-System Constrain conditions to compare with a constant Additional feature: {…}(n) block repeat

Jason Stredwick, MSU 2004 Table Language Forward(n) Backward(n) Up(n) Down(n) Left(n) Right(n) Clockwise(n) Counter-clockwise(n) [ ] { block }(n) [{[forward(6)]left(1)}(4)] up(1)forward(3)down(1) [{[forward(4.5)]left(1)}(4)]

Jason Stredwick, MSU 2004 Neural Network Language decrease-weight(n) duplicate(n) increase-weight(n) loop(n) merge(n) next(n) output(n) parent(n) reverse(n) set-function(n)

Jason Stredwick, MSU 2004 Mutation Original: P0(n0, n1) : n0 > 5.0  { a(1.0)b(2.0) }(n1) n0 > 2.0  [ P1(n , n0 / 2.0) ] Mutate condition: P0(n0, n1) : n0 > 7.0  { a(1.0)b(2.0) }(n1) n0 > 2.0  [ P1(n , n0 / 2.0) ] Mutate arguement: P0(n0, n1) : n0 > 5.0  { a(1.0)b(2.0) }(n1) n0 > 2.0  [ P1(n , n0/2.0) ]

Jason Stredwick, MSU 2004 Mutation Original: P0(n0, n1) : n0 > 5.0  { a(1.0)b(2.0) }(n1) n0 > 2.0  [ P1(n , n0 / 2.0) ] Mutate symbol: P0(n0, n1) : n0 > 7.0  { c(1.0)b(2.0) }(n1) n0 > 2.0  [ P1(n , n0 / 2.0) ] Mutate random symbol (removed b(2.0)): P0(n0, n1) : n0 > 5.0  { a(1.0) }(n1) n0 > 2.0  [ P1(n , n0/2.0) ]

Jason Stredwick, MSU 2004 Mutation Original: P0(n0, n1) : n0 > 5.0  { a(1.0)b(2.0) }(n1) n0 > 2.0  [ P1(n , n0 / 2.0) ] Insert random symbol: P0(n0, n1) : n0 > 7.0  { a(1.0)b(2.0) }(n1)c(3.0) n0 > 2.0  [ P1(n , n0 / 2.0) ] Encapsulate a block of characters: P0(n0, n1) : n0 > 5.0  { P2(n0, n1) }(n1) n0 > 2.0  [ P1(n , n0/2.0) ] P2(n0, n1) : n0 > 5.0  a(1.0)b(2.0) n0 > 2.0  a(1.0)b(2.0)

Jason Stredwick, MSU 2004 Recombination Original: P3(n0, n1) : n0 > 5.0  { a(1.0)b(2.0) }(n1) n0 > 2.0  [ P1(n , n0 / 2.0) ] P3(n0, n1) : n0 > 3.0  b(3.0)a(2.0) n0 > 1.0  P1(n , n ) Replace condition-successor pair P3(n0, n1) : n1 > 3.0  b(3.0)a(2.0) n0 > 2.0  [ P1(n , n0 / 2.0) ]

Jason Stredwick, MSU 2004 Recombination Original: P3(n0, n1) : n0 > 5.0  { a(1.0)b(2.0) }(n1) n0 > 2.0  [ P1(n , n0 / 2.0) ] P3(n0, n1) : n0 > 3.0  b(3.0)a(2.0) n0 > 1.0  P1(n , n ) Replace successor P3(n0, n1) : n1 > 3.0  b(3.0)a(2.0) n0 > 2.0  P1(n , n )

Jason Stredwick, MSU 2004 Recombination Original: P3(n0, n1) : n0 > 5.0  { a(1.0)b(2.0) }(n1) n0 > 2.0  [ P1(n , n0 / 2.0) ] P3(n0, n1) : n0 > 3.0  b(3.0)a(2.0) n0 > 1.0  P1(n , n ) Replace one block with another P3(n0, n1) : n1 > 3.0  b(3.0)a(2.0) n0 > 2.0  [ b(3.0)a(2.0) ]

Jason Stredwick, MSU 2004 References Algorithmicbotany.com Prusinkiewicz, P and Lindenmayer, A. The Algorithm Beauty of Plants, 1996 Hornby, Gregory S. and Pollack, Jordan B. (2001). The advantages of Generative Grammatical Encodings for Physical Design Hornby, Gregory S. and Pollack, Jordan B. (2001). Body-Brain Co-evolution Using L-systems as a Generative Encoding Hornby, Gregory S., Lipson, Hod, and Pollack, Jordan B. (2001). Evolution of Generative Design Systems for Modular Physical Robots Hornby, Gregory S. and Pollack, Jordan B. (2001). Evolving L-Systems to Generate Virtual Creatures