rick parent - cis682 l-systems lindenmayer systems complex but constrained. prusinkiewicz and...

29
Rick Parent - CIS68 L-Systems Lindenmayer Systems Complex but constrained. Prusinkiewicz and Lindenmayer Recursive branching structure

Upload: solomon-fletcher

Post on 02-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Rick Parent - CIS682

L-Systems

Lindenmayer Systems

Complex but constrained.

Prusinkiewicz and Lindenmayer

Recursive branching structure

Rick Parent - CIS682

Recursive Branching Structure

Rick Parent - CIS682

Botany - structure

Stems, roots, buds, leaves, flowers

Herbaceous or woody

Dichotomous or monopodial

Terminal bud or lateral bud

Vegetative bud or flower bud

Alernate, opposite, or whorled.

Rick Parent - CIS682

Botany - growth influences

Lineage - age

Cellular descent - nutrients and hormones

Tropisms - e.g., phototropism, geotropism

Obstacles - collision response: temporary or permanent.

Rick Parent - CIS682

DOL-Systems

Production rules: i -> i

D - deterministic

0 - zero contextual systems (context-free)

Axiom - initial string

Parallel rewriting rules.

Rick Parent - CIS682

Geometric Interpretation of String

Geometric replacement

- replace each symbol of string with a graphic element

- connectivity assumptions

Turtle graphics

- each symbol is a command to a drawing pen.

Rick Parent - CIS682

Geometric Replacement - Example

XXTTXX

A -> BCB

B -> XX

C -> TT

Axiom: A

A

BCB

Rick Parent - CIS682

Geometric Replacement

XXTTXX

X: T:

X X X XT T

Rick Parent - CIS682

Turtle Graphics

“drawing turtle” is controlled by symbols of string

Symbols read from string in left to right order

State of turtle: position and direction: (x, y, )

Parameters

- d: linear step size

- : angular step size.

Rick Parent - CIS682

Turtle Graphics

F Move forward a distance d while drawing a line. Its state will change from (x,y,) to (x+d*cos , y+d*sin , )

f Move forward a distance d without drawing a line. Its state will change as above.

+ Turn left by an angle d. Its state will change from (x,y, ) to (x,y, + )

- Turn right by an angle d. Its state will change from (x,y, ) to (x,y, - ).

Rick Parent - CIS682

Turtle Graphics - Example

A -> BCB

B -> FF

C -> TT

T -> -F++F-

Axiom: A

A

BCB

FFTTFF

FF -F++F- -F++F- FF

Rick Parent - CIS682

Turtle Graphics - Example

FF -F++F- -F++F- FFd:

: 45 degrees

Initial state: (10,10,0)

F F F F-F++F- -F++F-

Rick Parent - CIS682

Bracketed L-Systems

Brackets- push and pop states- multiple types of brackets- brackets have attachment semantics

X X [ XX ] { XX } X X

Rick Parent - CIS682

Properties

Can be recursive- reduce size based on branching level - self-similarity under scale

Database amplification

Attribute symbols: line length, width, color, etc.

Track string development => growth process.

Rick Parent - CIS682

Rick Parent - CIS682

Rick Parent - CIS682

Rick Parent - CIS682

Rick Parent - CIS682

Rick Parent - CIS682

Non-Deterministic

S -> F A F

A -> [ + F B F ]

A -> F

B -> [ - F B F ]

B -> F

Axiom: S

F F F F [ + F F F ] F

F [ + F [ - F F F ] F ] F

Rick Parent - CIS682

Rick Parent - CIS682

Stochastic L-Systems

S 1.0 -> F A F

A 0.8 -> [ + F B F ]

A 0.2 -> F

B 0.4 -> [ - F B F ]

B 0.6 -> F

Rick Parent - CIS682

Context-Sensitive L-Systems

S -> F A T

A>T -> [ + F B F ]

A>F -> F

F<B -> [ - F A F ]

T -> F

F<B >F -> [ - F A F ]

Rick Parent - CIS682

Animating Plant Growth

Flexible movement of structure

Elongation of existing structures

Changes in topology due to growth process

F -> FF F -> F1

F1 -> F2

F2 -> F3

F 3-> F4

Rick Parent - CIS682

Parametric L-Systems

S -> A(0)

A(t) -> A(t+1)

A(t): t>=1.0 -> F

Rick Parent - CIS682

Timed L-Systems

Global time variable

Local age value

(0, 0) -> ( (1,1), (2, 2), … , (n, n) )

Jump from terminal age to terminal age.

Rick Parent - CIS682

Interacting with the Environment

Physical obstacles

Wind

Gravity

Nutrients, moisture from soil

Sunlight: length of day, shadows.

Rick Parent - CIS682

Open L-Systems

Mech and Prusinkiewicz

Communication terms

- Request and transmit information w/ environment

- Distribution of nutrients, sunlight, etc.

Rick Parent - CIS682

L-Systems - Summary

Branching structure, self-similarity

Controlled complexity , data base amplification

Geometric replacement, Turtle graphics

Animation

- topology changes

- dynamics of static structure

Non-deterministic, stochastic, context sensitive, timed, open

- growth of individual elements.

- time-varying drawing parameters