1 |
|
2 |
include (disc) |
3 |
include (simple_leaf) |
4 |
|
5 |
ignore A G E I F + - / & ^ K Leaf; |
6 |
|
7 |
mycelis_muralis(n) => attr (material, 'branches) attr (width, 3) attr (color, '0 1 0) attr (distance, 80) I(20) F A(0), n; |
8 |
S < A(t) => TV attr (material, 'petals) K(0); |
9 |
V < A(t) => TV attr (material, 'petals) K(0); |
10 |
A(0) => M[&(30) Leaf attr (width, width * 0.7) G]F/(137.5)A(2); |
11 |
A(t) => A(t-1); |
12 |
S < M => S; |
13 |
S > T => T; |
14 |
T < G => F&(15)A(2); |
15 |
V < M => S; |
16 |
T > V => W; |
17 |
W => V; |
18 |
I(0) => S; |
19 |
I(t) => I(t-1); |
20 |
K(t) => K(t+1); |
21 |
Leaf => [&(30) attr (material, 'leaves) attr (color, '0.4 1 0) simple_leaf (18, 25)]; |
22 |
|
23 |
ruleset ( |
24 |
include (simple_petal) |
25 |
|
26 |
K(n) : n <= 3 => [&(90) attr (color, '0.7 0.7 0) disc(n*4+8)]; |
27 |
K(n) : n <= 8 => [ attr (color, '1 1 0) attr (distance, 8+n*8) petal (90-n*10, 5) ]; |
28 |
K(n) : n <= 8+5 => [ attr (color, '0.9 0.7 0) attr (distance, 144-n*8) petal (10, 8+6-n) ]; |
29 |
K(n) => [&(90) attr (color, '0.6 0.6 0) disc(16) ]; |
30 |
) |