Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 1 10/27/2015 07:26 UML Simplicity in Complexity

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

3 3 10/27/2015 07: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 4 10/27/2015 07:26 UML Deterministic, Context Free L-Systems (DOL) Grammar: Derivation:

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

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

7 7 10/27/2015 07: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 8 10/27/2015 07:26 UML Turtle Interpretation of Character String Character Interpretation F f + -

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

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

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

12 12 10/27/2015 07: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 13 10/27/2015 07:26 UML Example of FASS Curves Generated by Edge-rewriting FASS = space-filling, self-avoiding, simple, and self-similar

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

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

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

17 17 10/27/2015 07: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 18 10/27/2015 07:26 UML Three Dimensional Hilbert Curve

19 19 10/27/2015 07: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 20 10/27/2015 07:26 UML Tree OL-Systems s a b c d e s T1T2 a b c d e Production

21 21 10/27/2015 07: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 22 10/27/2015 07:26 UML Plant-Like Structures Generated by Bracketed OL-Systems

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

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

25 25 10/27/2015 07:26 UML Stochastic OL-Systems 0.33 0.34

26 26 10/27/2015 07:26 UML

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

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

29 29 10/27/2015 07: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 30 10/27/2015 07: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 31 10/27/2015 07:26 UML Example of Textures and Parametric Surface Models

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

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

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

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

36 36 10/27/2015 07:26 UML

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

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

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

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

41 41 10/27/2015 07: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 42 10/27/2015 07:26 UML Inflorescences: Compound Flowering Structures Racemes: Monopoidal Inflorscences Generating Partial L-System: L : leaf I : Internode K : Flower

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

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

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

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


Download ppt "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."

Similar presentations


Ads by Google