Download presentation
Presentation is loading. Please wait.
Published byEileen Fleming Modified over 9 years ago
1
Plant Modeling using L-Grammars Andreea Francu - afrancu@caip Department of Electrical and Computer Engineering
2
L-Grammars Parallel grammars with one type of symbols Used to generate strings A string –describes a 2D or 3D scene –contains commands for a Turtle Graphics interpreter
3
Turtle Graphics A turtle accepts commands: –forward (F), turn left (+), turn right (-) –3D commands: & ^ / \ –example: F-F+F Commands are relative to the coordinates of the turtle F F F - + Turtle Start
4
L-Grammar Applet Visualizing tool for L-Grammars Predefined grammars Accepts new grammars Components: –Grammar parser –Grammar derivator –3D model generator –3D model visualizer
5
L-Grammar Applet Grammar parser –translates user input into grammar internal format Grammar derivator –keeps current derivation –constructs new derivations by substituting left- hand sides with their productions 3D model generator –implements Turtle Graphics engine –generates a 3D model with lines and polygons 3D model visualizer –perspective projection of the 3D model
6
Example: 2D Trees F->FF-[-F+F+F]+[+F-F-F] O->ULFFF U->[+++G][---G]TU G->+H[-G]L H->-G[+H]L T->TL L->[-FFF][+FFF]F X->F-[[X]+X]+F[+FX]-X F->FF
7
Example: 3D Bush
8
Example: 3D Flower
9
Conclusions L-Grammars are the standard way to generate realistic images of plants Small representation for large 3D models –database amplification Grammar complexity increases dramatically when describing –angles, lengths, thickness, colors, textures, tropism
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.