home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
oct93
/
graphics
/
graphtal.lha
/
Graphtal
/
Examples
/
leaf.lsys
< prev
next >
Wrap
Text File
|
1992-11-02
|
646b
|
29 lines
/*
* Example of a leaf.
*
* The Algorithmic Beauty of Plants, p. 124
*/
lsystem Leaf;
table Leaf {
const LA=5; // initial length - main segment
RA=1.1; // growth rate - main segment
LB=2.2; // initial length - lateral segment
RB=1.21; // growth rate - lateral segment
SD=1;
DW=1.01;
PD=0.9; // growth potential decrement
A(t) -> F(LA,1, RA)
[ tu(-60) B(t) sv ]
[ A(t+1) ]
[ tu(60) B(t) sv ];
B(t) :t>0 -> F(LB, SD, RB) B(t-PD);
F(s,w,r) -> F(s*r, w*DW, r);
};
attributes {
axiom co("Green") wi(1) { sv A(0) };
derivation Leaf(20);
};