| 1 |
root |
1.1 |
// |
| 2 |
|
|
// some fantasy flower |
| 3 |
|
|
// |
| 4 |
|
|
|
| 5 |
|
|
include (simple_leaf) |
| 6 |
|
|
include (simple_petal) |
| 7 |
|
|
|
| 8 |
|
|
// fig(n) => attr (material, 'leaves) attr (distance, 50) simple_leaf (30, 30); |
| 9 |
|
|
|
| 10 |
|
|
fig(n) => tree(5), n; |
| 11 |
|
|
|
| 12 |
|
|
tree(n) : n => attr (color, '0.2 0.8 0) attr (width, 2) F(8) L /(137.5) tree(n-1); |
| 13 |
|
|
tree(n) => F(10) attr (distance, 5) /(9) [attr (distance, 10) petal (80, 7, 1, 10)] F(15) |
| 14 |
|
|
attr (color, '1 1 0.4) petal (10, 7, 8, 20, 8); |
| 15 |
|
|
L => [attr (width, 1) &(30) simple_leaf (30, 30) ^(15) F(10) |
| 16 |
|
|
attr (distance, 4) attr (color, '1 0.8 0) petal (80, 3)]; |
| 17 |
|
|
|