Add L-system.models.tree-5

db4
Eduardo Cavazos 2009-01-11 11:02:48 -06:00
parent 829dd6b584
commit 421c11d7a9
1 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,37 @@
USING: accessors ui L-system ;
IN: L-system.models.tree-5
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: tree-5 ( <L-system> -- <L-system> )
L-parser-dialect >>commands
[ 5 >>angle ] >>turtle-values
"c(4)FFS" >>axiom
{
{ "S" "FFR>(60)R>(60)R>(60)R>(60)R>(60)R>(30)S" }
{ "R" "[Ba]" }
{ "a" "$tF[Cx]Fb" }
{ "b" "$tF[Dy]Fa" }
{ "B" "&B" }
{ "C" "+C" }
{ "D" "-D" }
{ "x" "a" }
{ "y" "b" }
{ "F" "'(1.25)F'(.8)" }
}
>>rules ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: main ( -- ) [ L-system tree-5 "L-system" open-window ] with-ui ;
MAIN: main