Plant Modeling using LGrammars Andreea Francu afrancucaip Department

  • Slides: 9
Download presentation
Plant Modeling using L-Grammars Andreea Francu - afrancu@caip Department of Electrical and Computer Engineering

Plant Modeling using L-Grammars Andreea Francu - afrancu@caip Department of Electrical and Computer Engineering

L-Grammars • Parallel grammars with one type of symbols • Used to generate strings

L-Grammars • Parallel grammars with one type of symbols • Used to generate strings • A string – describes a 2 D or 3 D scene – contains commands for a Turtle Graphics interpreter

Turtle Graphics • A turtle accepts commands: Turtle – forward (F), turn left (+),

Turtle Graphics • A turtle accepts commands: Turtle – forward (F), turn left (+), turn right (-) – 3 D commands: & ^ / – example: F-F+F • Commands are relative to the coordinates of the turtle F + F F Start

L-Grammar Applet • • Visualizing tool for L-Grammars Predefined grammars Accepts new grammars Components:

L-Grammar Applet • • Visualizing tool for L-Grammars Predefined grammars Accepts new grammars Components: – Grammar parser – Grammar derivator – 3 D model generator – 3 D model visualizer

L-Grammar Applet • Grammar parser – translates user input into grammar internal format •

L-Grammar Applet • Grammar parser – translates user input into grammar internal format • Grammar derivator – keeps current derivation – constructs new derivations by substituting lefthand sides with their productions • 3 D model generator – implements Turtle Graphics engine – generates a 3 D model with lines and polygons • 3 D model visualizer – perspective projection of the 3 D model

Example: 2 D 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

Example: 2 D 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

Example: 3 D Bush

Example: 3 D Bush

Example: 3 D Flower

Example: 3 D Flower

Conclusions • L-Grammars are the standard way to generate realistic images of plants •

Conclusions • L-Grammars are the standard way to generate realistic images of plants • Small representation for large 3 D models – database amplification • Grammar complexity increases dramatically when describing – angles, lengths, thickness, colors, textures, tropism