This program now supports parametric l-systems

cvs
Eduardo Cavazos 2006-01-18 05:58:59 +00:00
parent 70abfbdab9
commit bcec3d3f4e
1 changed files with 31 additions and 10 deletions

View File

@ -345,27 +345,48 @@ H{ [[ "P" "[A]>>>>>>>>>[cB]>>>>>>>>>[ccC]>>>>>>>>>[cccD]" ]]
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: tree-5 ( -- ) lparser-dialect 5 angle set
! : tree-5 ( -- ) lparser-dialect 5 angle set
[ 4 set-color-index ] "1" command-table get set-hash
[ 60 neg rotate-z ] "2" command-table get set-hash
[ 1.25 scale-length ] "3" command-table get set-hash
[ 0.8 scale-length ] "4" command-table get set-hash
[ 30 neg rotate-z ] "5" command-table get set-hash
! [ 4 set-color-index ] "1" command-table get set-hash
! [ 60 neg rotate-z ] "2" command-table get set-hash
! [ 1.25 scale-length ] "3" command-table get set-hash
! [ 0.8 scale-length ] "4" command-table get set-hash
! [ 30 neg rotate-z ] "5" command-table get set-hash
H{ [[ "S" "FFR2R2R2R2R2R5S" ]]
! H{ [[ "S" "FFR2R2R2R2R2R5S" ]]
! [[ "R" "[Ba]" ]]
! [[ "a" "$tF[Cx]Fb" ]]
! [[ "b" "$tF[Dy]Fa" ]]
! [[ "B" "&B" ]]
! [[ "C" "+C" ]]
! [[ "D" "-D" ]]
! [[ "x" "a" ]]
! [[ "y" "b" ]]
! [[ "F" "3F4" ]]
! } rules set
! "1FFS" result set ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: tree-5 ( -- ) lparser-dialect 5 angle set 1 thickness set
"c(4)FFS" axiom set
H{ [[ "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" "3F4" ]]
} rules set
"1FFS" result set ;
[[ "F" "'(1.25)F'(.8)" ]]
} rules set ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!