1 / 9

Plant Modeling using L-Grammars

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 A string describes a 2D or 3D scene contains commands for a Turtle Graphics interpreter.

kirima
Download Presentation

Plant Modeling using L-Grammars

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 F + F - F Start 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

  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 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 F->FF-[-F+F+F]+[+F-F-F]

  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

More Related