Revision: | 1.1 |
Committed: | Thu Nov 6 14:31:25 2008 UTC (15 years, 6 months ago) by root |
Branch: | MAIN |
CVS Tags: | HEAD |
Log Message: | *** empty log message *** |
# | Content |
---|---|
1 | // draw a simple leaf with two sides |
2 | |
3 | // e is the angle of the leaf sides against the plane |
4 | // b is the bow initial angle. less means leaner leaves |
5 | // n is the number of line segments used to draw the leaf. |
6 | |
7 | simple_leaf(e,b) => simple_leaf (e,b,8), 1; |
8 | simple_leaf(e,b,n) => [attr (distance, distance/n) [{.\(e)bow(b,n)}] {./(e)bow(-b,n)}], n+1; |
9 | bow(b,n) => +(b) attr (delta, b*2/(n-1)) seg; |
10 | seg => F - seg; |