Jeff,
I noticed in your '4DNav.turtle' code (which I recognize is revived from
the 'lsys' code!) this function:
: Rz ( angle -- Rx ) deg>rad
[ dup cos , dup sin neg , 0 ,
dup sin , dup cos , 0 ,
0 , 0 , 1 , ] 3 make-matrix nip ;
Ah, my old friend 'Rz'. I think I wrote that word back in 2005. :-)
Our arsenal for handling complexity is alot more robust these days. One way to
write the above is:
: Rz ( angle -- Rx )
deg>rad
{ { [ cos ] [ sin neg ] 0 }
{ [ sin ] [ cos ] 0 }
{ 0 0 1 } } deep-cleave-quots ;
I don't know that the matrix template will get any clearer than that. :-)
If you are interested, here is deep-cleave-quots:
----------------------------------------------------------------------
:: [deep-cleave-quots] ( SEQ -- quot )
[let | QUOTS [ SEQ [ quotation? ] deep-filter ]
RECIPE [ SEQ [ dup quotation? [ drop , ] [ ] if ] deep-map ] |
[ QUOTS cleave RECIPE bake ] ] ;
MACRO: deep-cleave-quots ( seq -- quot ) [deep-cleave-quots] ;
----------------------------------------------------------------------
Ed
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk