Jose, What is cap? ( t3=. t2 f. cap )
Linda -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Jose Mario Quintana Sent: Thursday, June 05, 2014 6:07 PM To: Programming forum Subject: Re: [Jprogramming] Turtle graphics, Gaussian integers and Mechanical action... t0=. ('0' = _1 {:: ])@:((, <@;@:{~&_1 _2)@]^:(2 -~ [)&('1';'0')) NB. Tacit 0 BUILD=: 3 : '(B=:A,B);A=:B,A' e0=: 13 :'-.>0{"2 (BUILD^:y'''')[''A B''=:1`0' NB. Explicit 0 t1=. _1&({::)@:((] , <@:(_1&({::) , _2&({::)))@:]^:[)&(0;1) NB. Tacit 1 t2=. _1&({::)@:(({: , ,&.>/@:|.)@:]^:[&(0;1)) NB. Tacit 2 ( t3=. t2 f. cap ) NB. Tacit 3 (for Linda) [: _1&({::) ([: ({: , [: ,&.>/ |.) ])^:[&(0;1) (t0 20) -: (e0 9) 1 (t1 18) -: (e0 9) 1 (t2 18) -: (e0 9) 1 (t3 18) -: (e0 9) 1 st NB. Comparison... (] , <@:(1&({::) * 2&({::)))@:(] ; 7!:2@:] ; 6!:2) 100 st&> 't0 20' ; 'e0 9' ; 't1 18' ; 't2 18' ; 't3 18' ┌─────┬─────┬──────────┬────────┐ │t0 20│38400│3.07565e_5│1.18105 │ ├─────┼─────┼──────────┼────────┤ │e0 9 │14592│2.57905e_5│0.376335│ ├─────┼─────┼──────────┼────────┤ │t1 18│32000│3.4395e_5 │1.10064 │ ├─────┼─────┼──────────┼────────┤ │t2 18│22912│1.2253e_5 │0.28074 │ ├─────┼─────┼──────────┼────────┤ │t3 18│23424│1.44645e_5│0.338817│ └─────┴─────┴──────────┴────────┘ On Wed, Jun 4, 2014 at 11:34 PM, Linda Alvord <[email protected]> wrote: > > Raul, Thanks to Joe, here's another way to get your image of F_Words: > > require 'plot' > > BUILD=: 3 : '(B=:A,B);A=:B,A' > > g=: 13 :'-.>0{"2 (BUILD^:y'''')[''A B''=:1`0' > > NB. (g 9)-:'0'=_1{::F_Words 20 > > plot }:+/\ 0,*/\(^~ 0j_1 0j1 $~ #)g 9 > > Linda > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Joe Bogner > Sent: Tuesday, June 03, 2014 12:49 PM > To: [email protected] > Subject: Re: [Jprogramming] Turtle graphics, Gaussian integers and > Mechanical action... > > > > > > > Would it be possible to write a recursive function that would get your > list > > directly as numbers. > > > > Not recursive, but you could do this: > > > build =: 3 : 0 > A=:B,A > B=:A,B > ) > ((build^:3 '') [ 'A B'=:1 `0)-:(0 1 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0) > 1 > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
