home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
oct93
/
graphics
/
graphtal.lha
/
Graphtal
/
Examples
/
sunflower.lsys
< prev
next >
Wrap
Text File
|
1992-10-30
|
996b
|
34 lines
/*
* Example a sunflower head.
*
* The Algorithmic Beauty of Plants, p. 103
*
* Instead of a real seed shape, we simply use spheres
* and the petal shapes are triangles.
*/
lsystem sunflower;
table sunflowerHead {
A(n) -> tu(137.5) [ G(n^0.5) C(n) ] A(n+1);
C(n) :n <= 440 -> co("brown") s(1.1);
C(n) : 440 < n && n <= 565 -> co("SaddleBrown") s(1.2);
C(n) : 565 < n && n <= 580 -> {
sv tu(45) G sv tu(-45) G sv co("yellow")
};
C(n) : 580 < n && n <= 595 -> {
sv tu(45) G sv tu(-45) G sv co("LightYellow")
};
C(n) : 595 < n && n <= 610 -> {
sv tu(45) G sv tu(-45) G sv co("LightGoldenrodYellow")
};
C(n) : 610 < n -> {
sv tu(45) G sv tu(-45) G sv co("gold")
};
};
attributes {
axiom A(0);
derivation sunflowerHead(630);
};