Filters, Growth & Lindenmayer-Systems
Duane A. Bailey
© Bill Amend
Outline of this class (resources are
below
)
Convolution: the controlled mixing of data to serve a purpose.
An Excel
example.
Notions borrowed from analysis of frequency-based signals.
Concept: JPEG encodes images using frequency-based encoding; it's a "lossy" encodoing.
Filters: low-pass, high-pass, and band-filters.
Bluring. Accentuating low-pass filter.
Edge-detection. High-pass filter.
Sharpening. Enhancing edges, attenuating low-frequency components of the image.
GRAMMATICAL SYSTEMS: We recall phrase grammar systems.
Traditional "phrase" grammars (Chomsky).
Terminology: terminal and non-terminal symbols, start symbol, production, derivation, word, language, acceptance.
Example: a simple English grammar
Nonterminals: upper case letters
Terminals: lower case words
Start symbol: T.
Grammar:
T → S V O stop
S → D N
V → hugged | ate | chased | kissed | is
O → D N
O → D N C V O
C → that | comma which | comma but | and
D → a | the
N → cat | dog | prince | frog | princess
Some possible derivations:
T ⇒ the dog chased the cat stop
T ⇒ the cat hugged the dog stop
T ⇒ the frog kissed the princess that is a cat stop
T ⇒ a dog is a dog comma which is a prince that ate a cat stop
Parallel string grammars are simply what happens when we rewrite everything in parallel. Recall our simple example when studying Turing machines:
Nonterminals: upper case letters
Start symbol: A
Grammar:
A → B
B → BA
First few words:
Generation
Word
#A
#B
0
A
1
0
1
B
0
1
2
BA
1
1
3
BAB
1
2
4
BABBA
2
3
5
BABBABAB
3
5
6
BABBABABBABBA
5
8
7
BABBABABBABBABABBABAB
8
13
8
BABBABABBABBABABBABABBABBABABBABBA
13
21
Note the patterns.
Notion of a "turtle-based" drawing system. Logo?
An experimental applet
"F" means "go forward".
"-" means "turn left" by a specified amount.
"+" means "turn right" by a specified amount.
"[" means "remember position and orientation".
"]" means "restore position and orientation".
Use L-system to generate turtle commands. Basis for simple, stylized plants.
Some exercises to think about (some in lab):
Draw an oriented line.
Draw a triangle.
Draw a square.
Draw like Spirograph! How?
Draw a simple snowflake.
Can you draw a binary tree without intersecting branches?
Draw a simple tree.
Draw a more complex tree.
Draw an aperiodic comb.
Draw a fractal snowflake.
What do we get with the following grammar:
Start: FX
All turns 90 degrees.
X → X+YF+
Y → -FX-Y
Fractal dimension: log(self-similar pieces)/log(magnification).
Resources needed for this class:
The
L-system
applet.
Selections
from the Algorithmic Beauty of Plants, by Przemyslaw Prusinkiewicz and Aristid Lindenmayer. We will be using this material in lab.
Turing's
Chemical Basis for Morphogensis
.
For next lecture:
Lindenmayer's two papers on
Mathematical Models for Cellular Interatictions in Development
.
Donald Knuth's paper on
song complexity
.
A wonderful
kolam
website.
These
items require Acrobat Reader.