*

: x x t sin + .5 mod ;
: l y t 3 * sin abs 2 / -
38 * floor = * 2 x .37 - 45 * floor ** floor / 4 mod + ;
: lp
0 28672 15 l 28672 14 l 24576 13 l 1408 12 l
3536 13 l 14248 480 9 l 4064 8 l
3 5 l 2311 4 l 2 3 l 1 >= ;
: lw
0 992 24 l 8176 13 l 1088 7 l 2176 6 l 3968 5 l
5872 4 l 8176 3 l 8160 2 l 1008 1 l 112 0 l 1 >= ;
: lg
0 29296 12 l 29224 11 l 17512 10 l 15896 9 l
4096 8 l 3004 7 l 18302 6 l 16508 5 l
24576 4 l 24584 3 l 24604 2 l 14 1 l 2 0 l 1 >= ;

( www.thesands.ru/forth-demotool )

lp lw dup dup >r >r over + swap 1.5 / lg 1.5 / + r> +
2dup + 0 = 7 / r> +

Based on: Two ducks - Shin En


comments powered by Disqus