1 10/27/2015 07:26 UML Simplicity in Complexity. 2 10/27/2015 07:26 UML Rewriting Systems Classic Example: Koch 1905 Initiator Generator.

Slides:



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

C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
Translator Architecture Code Generator ParserTokenizer string of characters (source code) string of tokens abstract program string of integers (object.
CS252: Systems Programming
JYC: CSM17 BioinformaticsCSM17 Week 8: Simulations (part 2): plant morphology sea shells (marine molluscs) fractals virtual reality –Lindenmayer systems.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
Chapter Chapter Summary Languages and Grammars Finite-State Machines with Output Finite-State Machines with No Output Language Recognition Turing.
Introduction to Computability Theory
L systems (Aristid Lindenmayer)
L-systems Presented by Luv Kohli COMP258 October 30, 2002 Images copyright © 1992 D. Fowler, P. Prusinkiewicz, and J. Battjes.
1Ellen L. Walker Recognizing Objects in Computer Images Ellen L. Walker Mathematical Sciences Dept Hiram College Hiram, OH 44234
Procedural Modeling L-Systems Procedural Terrain Procedural Behavior Based on the slides from Spring 2007.
Modeling of Plants Josh Markwordt November 27, 2007.
Simulating Trees with Fractals and L-Systems Eric M. Upchurch CS 579.
Modeling Plant Form Is plant form an emergent property of simple module systems?
Programming Languages An Introduction to Grammars Oct 18th 2002.
Plant Modeling using L-Grammars Andreea Francu - Department of Electrical and Computer Engineering.
Hierarchical Transformations Hierarchical Models Scene Graphs
College of Computer and Information Science, Northeastern UniversityAugust 12, CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2007.
3D shapes presentation Tatiana and Farah My Definition A 3D shape has a volume a height a width a length and stands out.
Approaches To Infinity. Fractals Self Similarity – They appear the same at every scale, no matter how much enlarged.
Morphogenesis and Lindenmayer Systems (L-systems) Gabriela Ochoa
IlliDOL: A Framework for Exploration of L- Systems in Three Dimensions Vilas Dhar Math 198 Spring 2003.
Chapter 2 Syntax A language that is simple to parse for the compiler is also simple to parse for the human programmer. N. Wirth.
Dragon Curve Drawn in Project 4… How to generate the string of drawing commands? How does the dragon curve come about? 1.
1 Introduction to Parsing Lecture 5. 2 Outline Regular languages revisited Parser overview Context-free grammars (CFG’s) Derivations.
Modelling of Ecosystems by Tools from Computer Science Summer School at Czech University of Life Sciences, Prague, September, 2013 Winfried Kurth.
L-Systems and Procedural Plants CSE 3541 Matt Boggus.
Syntax Specification and BNF © Allan C. Milne Abertay University v
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,
1 Chapter 3 Describing Syntax and Semantics. 3.1 Introduction Providing a concise yet understandable description of a programming language is difficult.
Examining the World of Fractals. Myles Akeem Singleton Central Illinois Chapter National BDPA Technology Conference 2006 Los-Angeles, CA.
PART I: overview material
3-1 Chapter 3: Describing Syntax and Semantics Introduction Terminology Formal Methods of Describing Syntax Attribute Grammars – Static Semantics Describing.
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.
ISBN Chapter 3 Describing Syntax and Semantics.
Copyright © by Curt Hill Grammar Types The Chomsky Hierarchy BNF and Derivation Trees.
Copyright © Curt Hill Languages and Grammars This is not English Class. But there is a resemblance.
CMSC 330: Organization of Programming Languages Context-Free Grammars.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Special Models.
LINDFERN Lindenmayer Systems in VPython Nick Langhammer.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
Experimenting with Grammars to Generate L-Systems October 29, 2007
Chapter 8 Properties of Context-free Languages These class notes are based on material from our textbook, An Introduction to Formal Languages and Automata,
Modelling of Ecosystems by Tools from Computer Science Summer School at Czech University of Life Sciences, Prague, September, 2013 Winfried Kurth.
Overview of Previous Lesson(s) Over View 3 Model of a Compiler Front End.
Functional-Structural Plant Modelling with GroIMP and XL Tutorial and Workshop at Agrocampus Ouest, Angers, 5-7 May, 2015 Winfried Kurth University of.
Descriptive Geometry. Introduction  What is Descriptive Geometry? →It is the study of points, lines, and planes in space to determine their locations.
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.
Context Free Grammars & Parsing CPSC 388 Fall 2001 Ellen Walker Hiram College.
BNF A CFL Metalanguage Some Variations Particular View to SLK Copyright © 2015 – Curt Hill.
Chapter 3 – Describing Syntax
Programming Languages Translator
CS510 Compiler Lecture 4.
L-systems L-systems are grammatical systems introduced by Lyndenmayer to describe biological developments such as the growth of plants and cellular organisms.
DATA STRUCTURES AND OBJECT ORIENTED PROGRAMMING IN C++
ATCM 3310 Procedural Animation
Syntax versus Semantics
Compiler Design 4. Language Grammars
CSE 311: Foundations of Computing
… NPDAs continued.
Prof. Susan Rodger Computer Science Dept
Presentation transcript:

1 10/27/ :26 UML Simplicity in Complexity

2 10/27/ :26 UML Rewriting Systems Classic Example: Koch 1905 Initiator Generator

3 10/27/ :26 UML Rewriting Systems: Formal Grammars 0 Best understood rewriting systems are those that operate on character strings 0 Chomsky 1956: formal grammars applied to natural languages 0 Backus & Naur 1959: rewriting notation applied to formal definition of programming language (ALGOL-60) 0 Lindenmayer 1968 introduced a new type of rewriting system, subsequently termed L-systems -Essential difference between Chomsky grammars and L- systems is that in L-systems productions are applied in parallel.

4 10/27/ :26 UML Deterministic, Context Free L-Systems (DOL) Grammar: Derivation:

5 10/27/ :26 UML Formal Definition of L-System 100% Real Math

6 10/27/ :26 UML Formal Definition of Derivation 100% Real Math

7 10/27/ :26 UML Turtle Interpretation of Strings Abelson & diSessa (MIT 1982) The state of the turtle is defined as an ordered triplet, where the cartesian coordinates represent the turtle’s position, and the angle , called the heading, is interpreted as the direction in which the turtle is facing.  Where am I?

8 10/27/ :26 UML Turtle Interpretation of Character String Character Interpretation F f + -

9 10/27/ :26 UML Turtle Interpretation of a String FFF-FF-F-F+F+FF-F-FFF String: + - 

10 10/27/ :26 UML Example of Turtle Interpretation: Quadratic Koch Island The L-System:

11 10/27/ :26 UML Sequence of Koch Curves Obtained by Modification of Production Successor

12 10/27/ :26 UML General Edge Rewriting The Koch constructions are a restricted case of general edge rewriting, where there can be more than one edge letter, interpreted by the turtle as “move forward”. Examples:

13 10/27/ :26 UML Example of FASS Curves Generated by Edge-rewriting FASS = space-filling, self-avoiding, simple, and self-similar

14 10/27/ :26 UML Node Rewriting: Turtle Interpretation PAPA QAQA Aligned with turtle state here: Turtle resumes here: Subfigure A

15 10/27/ :26 UML Node Rewriting Example: Hilbert Curve

16 10/27/ :26 UML Modeling in Three Dimensions U H L

17 10/27/ :26 UML Symbols to Control Turtle Orientation in Space +Turn left by angle , using rotation matrix Ru(  ) -Turn right by angle , using rotation matrix Ru(-  ) &Pitch down by angle , using rotation matrix R L (  ) ^Pitch up by angle , using rotation matrix R L (-  ) \Roll left by angle , using rotation matrix R H (  ) /Roll right by angle , using rotation matrix R H (-  ) Symbol Turtle Semantics

18 10/27/ :26 UML Three Dimensional Hilbert Curve

19 10/27/ :26 UML Branching Structures: Axial Trees At each node at most one outgoing straight segment is distinguished The first segment in the sequence originates at the root of the tree or as a lateral segment at some node Each subsequent segment is a straight segment The last segment is not followed by any straight segments

20 10/27/ :26 UML Tree OL-Systems s a b c d e s T1T2 a b c d e Production

21 10/27/ :26 UML Bracketed OL-Systems Turtle semantics: [Push the current state of the turtle onto a stack. The information saved contains the turtle’s position and orientation, and possibly other attributes such as color, segment width ]Pop a state from the state and make it the current state of the turtle. No line is drawn, although in general the position of the turtle changes Example:  F[+F][-F[-F]F]F[+F][-F]

22 10/27/ :26 UML Plant-Like Structures Generated by Bracketed OL-Systems

23 10/27/ :26 UML Plant-Like Structures Generated by Bracketed OL-Systems

24 10/27/ :26 UML Three Dimensional Bracketed OL-System

25 10/27/ :26 UML Stochastic OL-Systems

26 10/27/ :26 UML

27 10/27/ :26 UML Example of Stochastic DOL-System

28 10/27/ :26 UML Parametric DOL-Systems Formal ParametersActual Parameters Condition Derivation: L-System: Module

29 10/27/ :26 UML Parametric DOL Systems 0 A production matches a nodule in a parametric word if the following conditions are met: -The letter in the module and the letter in the production predecessor are the same -The number of actual parameters in the module is equal to the number of formal parameters in the production predecessor -The condition evaluates to true if the actual parameter values are substituted for the formal parameters in the production

30 10/27/ :26 UML Turtle Interpretation of Parametric Words If one or more parameters are associated with a symbol interpreted by the turtle, the value of the first parameter controls the turtle’s state. If the symbol is not followed by any parameters, default values specified ooutside the L-system are used as in the non-parametric case. The basic set of symbols affected by the introduction of parameters is listed below: F(a)Move forward a step of length a > 0. f(a)Move forward a step of length a without drawing a line +(a)Rotate around U by an angle of a degrees &(a)Rotate around L by an angle of a degrees /(a)Rotate around H by an angle of a degrees

31 10/27/ :26 UML Example of Textures and Parametric Surface Models

32 10/27/ :26 UML Developmental Surface Models Consider the following L-system:

33 10/27/ :26 UML Fern Drawn Using Leaves Specified by Previous L-System

34 10/27/ :26 UML Alternative Notation for Polygon Drawing

35 10/27/ :26 UML Parametric L-Systems Produce Varying Leaf Structures

36 10/27/ :26 UML

37 10/27/ :26 UML Rose Leaves Generated by L-System of Previous Slide

38 10/27/ :26 UML Parametric L-System Used to Generate Compound Leaves

39 10/27/ :26 UML Examples of Compound Leaves Generated by L-System of Slide 38

40 10/27/ :26 UML Examples of Compound Leaves Generated by L-System of Slide 38

41 10/27/ :26 UML General Branching Patterns 0 Terminal: main apex and all lateral apices terminate 0 Sympoidal: main apex terminates; some lateral apices continue 0 Monopoidal: main apex continues; all lateral apices terminate 0 Polypoidal: main apex continues; some lateral apices also continue

42 10/27/ :26 UML Inflorescences: Compound Flowering Structures Racemes: Monopoidal Inflorscences Generating Partial L-System: L : leaf I : Internode K : Flower

43 10/27/ :26 UML Pattern of Simple Racemes

44 10/27/ :26 UML Lily-of-the-Valley Example of Simple Raceme

45 10/27/ :26 UML Development of Raceme: Capsella Bursa-Pastoris

46 10/27/ :26 UML L-System Generating Capsella Bursa-Pastoris