L-Systems and Procedural Plants CSE 3541 Matt Boggus.

Slides:



Advertisements
Similar presentations
Splines I – Curves and Properties
Advertisements

Jason Stredwick, MSU 2004 L-Systems Lindenmayer Systems algorithmicbotany.org.
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
Computer Graphics Lecture 4 Geometry & Transformations.
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.
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.
Informationsteknologi Wednesday, November 7, 2007Computer Graphics - Class 51 Today’s class Geometric objects and transformations.
So far we’ve done… Dynamics and chaos Thermodynamics, statistical mechanics, entropy, information Computation, Turing machines, halting problem Evolution,
L systems (Aristid Lindenmayer)
Chapter 9: Recursive Methods and Fractals E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
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.
Modeling of Plants Josh Markwordt November 27, 2007.
Simulating Trees with Fractals and L-Systems Eric M. Upchurch CS 579.
Normal forms for Context-Free Grammars
CS 4731: Computer Graphics Lecture 5: Fractals Emmanuel Agu.
CS39N The Beauty and Joy of Computing Lecture #11 Recursion III It has been a challenge to power electronic components implanted within a body.
Holt Geometry 12-Ext Using Patterns to Generate Fractals 12-Ext Using Patterns to Generate Fractals Holt Geometry Lesson Presentation Lesson Presentation.
CS4395: Computer Graphics 1 Fractals Mohan Sridharan Based on slides created by Edward Angel.
LANGUAGE AND GRAMMARS © University of LiverpoolCOMP 319slide 1.
College of Computer and Information Science, Northeastern UniversityAugust 12, CS G140 Graduate Computer Graphics Prof. Harriet Fell Spring 2007.
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
Fractals and Terrain Synthesis
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.
Chapter 9: Geometry.
Computing & Information Sciences Kansas State University Lecture 37 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 37 of 42 Monday, 28 April.
Dragon Curve Drawn in Project 4… How to generate the string of drawing commands? How does the dragon curve come about? 1.
A D V A N C E D C O M P U T E R G R A P H I C S CMSC 635 January 15, 2013 Spline curves 1/23 Curves and Surfaces.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
Graphics Graphics Korea University cgvr.korea.ac.kr Model Construction 고려대학교 컴퓨터 그래픽스 연구실.
CS 376 Introduction to Computer Graphics 04 / 30 / 2007 Last Lecture :( Instructor: Michael Eckmann.
Modelling of Ecosystems by Tools from Computer Science Summer School at Czech University of Life Sciences, Prague, September, 2013 Winfried Kurth.
Model Construction 김 성 남. Contents What is Modeling? Model Construction - Interactive modeling tools - Scanning tools - Computer vision -
Tao Ju, Ron Goldman Rice University
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,
Ch 9 Infinity page 1CSC 367 Fractals (9.2) Self similar curves appear identical at every level of detail often created by recursively drawing lines.
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 10/27/ :26 UML Simplicity in Complexity. 2 10/27/ :26 UML Rewriting Systems Classic Example: Koch 1905 Initiator Generator.
Procedural Modelling of Plant Scenes Presented by: Kim R 2 Supervisors:Shaun Bangay Adele Lobb A research project for Computer Science Honours 2004.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Special Models.
LINDFERN Lindenmayer Systems in VPython Nick Langhammer.
Vertices, Edges and Faces By Jordan Diamond. Vertices In geometry, a vertices is a special kind of point which describes the corners or intersections.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Banff 2007: Innovations in Mathematics Education via the Arts Interactive Graphics Tools and Global Learning Mara Alagic & Glyn Rimmington Wichita State.
Syntax and Grammars.
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.
In the name of God Computer Graphics. Introduction Modeling techniques modeling techniques managements Some renderings.
Experimenting with Grammars to Generate L-Systems October 29, 2007
제 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.
Descriptive Geometry. Introduction  What is Descriptive Geometry? →It is the study of points, lines, and planes in space to determine their locations.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 2 Context-Free Languages Some slides are in courtesy.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Development of structure. Additional literature Prusinkiewicz P, Lindenmayer A., 1990, The algorithmic beauty of plants, Springer Korvin G., 1992, Fractal.
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.
L-systems L-systems are grammatical systems introduced by Lyndenmayer to describe biological developments such as the growth of plants and cellular organisms.
ATCM 3310 Procedural Animation
Chapter 5 Curves and Fractals.
Prof. Susan Rodger Computer Science Dept
Presentation transcript:

L-Systems and Procedural Plants CSE 3541 Matt Boggus

Content Parameterized models of trees Lindenmayer Systems – Self-similarity, Rewriting – D0L-systems – Grammars – Graphic Interpretation SpeedTree – a commercial tool for plant modeling

Parameterized trees Trunk (linkage) Branches (linkage, child of trunk node) Buds/flowers/fruit (child of branches)

Trunk Trunk – circular extrusion along a path For one segment, the radius of the cross section will remain constant or decrease from base to tip – Specifying a radius at each end and interpolate Path – set of points – Straight line – Add random rotation for each segment – Specify desired length, number of branches

Branching The trunk can spawn branches Each branch can spawn new branches For a branch, specify – Starting position – how close to base of the segment? – Branching angle – which direction does the branch extend in? – Length – how long should the branch be? Add randomness, but impose limits on all of those values θbθb θtθt

L-Systems A model of morphogenesis, based on formal grammars (set of rules and symbols) Introduced in 1968 by the Swedish biologist A. Lindenmayer Originally designed as a formal description of the development of simple multi- cellular organisms Later on, extended to describe higher plants and complex branching structures

Self-Similarity “When a piece of a shape is geometrically similar to the whole, both the shape and the cascade that generate it are called self-similar” (Mandelbrot, 1982) The recursive nature of the L-system rules leads to self-similarity and fractal-like forms are easy to describe with an L- system.

Self-Similarity in Fractals Exact Example Koch snowflake curve Starts with a single line segment On each iteration replace each segment by As one successively zooms in the resulting shape is exactly the same

Self-similarity in Nature Approximate Only occurs over a few discrete scales (3 in this Fern) Self-similarity in plants is a result of developmental processes, since in their growth process some structures repeat regularly. (Mandelbrot, 1982)

Rewriting Define complex objects by successively replacing parts of a simple object using a set of rewriting rules or productions. Example: Graphical object defined in terms of rewriting rules - Snowflake curve Construction: recursively replacing open polygons First four orders of the Koch Curve

Rewriting Systems on Character Strings The most extensively studied rewriting systems operate on character strings (Late 50s, Chomsky`s work on formal grammars) Later applications to Computer and formal Languges (BNF form) A. Lindenmayer (1968) new type of string-rewriting mechanism (L-systems). In L-systems productions are applied in parallel Reflects Biological motivation of L-systems

Types of L-systems Context-free: production rules refer only to an individual symbol Context-sensitive: the production rules apply to a particular symbol only if the symbol has certain neighbours Deterministic: If there is exactly one production for each symbol, Stochastic: If there are several, and each is chosen with a certain probability during each iteration

D0L-systems Simplest class of L-systems, deterministic and context free. Example: – Alphabet = {a,b} – Rules = {a → ab, b → a} – Axiom: b b | a └ a b ┘ │ a b a ┘ │ └ a b a a b _/ / ┘ └ \ a b a a b a b a Example of a derivation in a DOL-System Syntax of a production rule: Initiator → Generator

Grammar (C++ statements) --> { } --> | epsilon --> --> if ( ) --> if ( ) else --> while ( ) --> do while ( ) ; --> for ( ; ) --> case : --> switch ( ) --> break ; | continue ; --> return ; | goto ;

L-System Graphic Interpretation L-systems were conceived as a formal theory of development. Later, geometrical interpretations were proposed as a tool for fractal and plant modelling Graphic Interpretation of strings, based on turtle geometry (Prusinkiewicz et al, 89). State of the turtle: (x, y, α) – (x, y): Cartesian coordinates, turtle position – α: angle (heading) direction in which the turtle is facing Given the step size d and the angle increment δ, the turtle can respond to the commands represented by symbols

Turtle Interpretation of Strings F Move forward a step of length d. The state of the turtle changes to (x',y', α ), where x'= x + d cos( α ) and y'= y + d sin( α ). A line segment between points (x,y) and (x',y') is drawn f Move forward a step of length d without drawing a line. The state of the turtle changes as above + Turn left by angle δ. The next state of the turtle is (x, y, α + δ ) - Turn right by angle δ. The next state of the turtle is (x, y, α - δ)

Turtle Interpretation of Strings w: F+F+F+F p: F →F+F-F-FF+F+F-F Angle ( δ ) = 90º n= 0 n = 1 n = 2 Quadratic Koch island

Bracketed L-systems To represent branching structures, L-systems alphabet is extended with two new symbols: [ Push the current state of the turtle onto a stack ] Pop a state from the stack and make it the current state of the turtle (i.e. change position and heading)

w: F p: F → F[-F]F[+F][F] Angle (δ) = 60º n = Turtle Interpretation of Bracketed Strings

Stochastic L-systems Avoid regularity in the system by specifying different productions for the same symbol and choose between them based on probabilities and random numbers. For example, the productions : p1 : a -> (0.7) b a p2 : a -> (0.3) c a are 2 rewriting rules for the letter a. In one derivation step, either p1 or p2 will be applied to each occurrence of a, according to the given distribution (0.7 and 0.3).

Modeling in Three Dimensions Turtle interpretation of strings can be extended to 3D Represent the current orientation of the turtle in space by 3 vectors: H, L, U, indicating turtle’s Heading, the direction to the Left, and, the direction to the Right. 3 rotation matrices: R U, R L, and R H and a fixed angle δ The following symbols control turtle orientation in space: – +, - : Turn left and right, using matrix R U (δ) – &, ^ : Pitch down and up, using matrix R L (δ) – \, / : Roll left and right, using matrix R H (δ) – | : Turning around, using matrix R U (180º)

3D L-Systems

3D Bracketed L-Systems

SpeedTree Specialized commercial tool to model trees Mix of procedural and hand drawing modeling SpeedTree Model Library (150+ species, 500+ models, textures and meshes)

References Aristid Lindenmayer. Mathematical models for cellular interaction in development. parts I and II. Journal of Theoretical Biology, 18:280– 299 and 300–315, P. Prusinkiewicz and A. Lindenmayer. The Algorithmic Beauty of Plants. Springer-Verlag, Algorithmic Beauty of Plants An Introduction to L-Systems Speedtree