Try https://gist.github.com/rdm/3b11815d4af7392e1f62?
Thanks, -- Raul On Fri, Jun 26, 2015 at 8:21 PM, Linda Alvord <lindaalv...@verizon.net> wrote: > When I copy and paste your code I get one giant last line plan=:... > > Can you show me the line breaks? > > I get a two lineerror: > > |value error: plan > | plan=.BASE(<3 1)}FRONT(<2 1)}(LEFT,TOP,RIGHT)1}BACK(<0 1)}4 3$BLANK > colours=.,/,/>,"_1 each/"1 nsteps mysquarecolours each plan colours viewmat > i. ($plan)*nsteps+1 > > > Linda > -----Original Message----- > From: programming-boun...@forums.jsoftware.com > [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Brian Schott > Sent: Friday, June 26, 2015 4:21 PM > To: Programming forum > Subject: Re: [Jprogramming] Trouble making patter for a color cube > > Linda, > > I am able to make Mike's code work for the following case in jqt and in jhs. > Both produce viewmats. Perhaps you could try it because it eliminates blank > lines and includes other side verbs and nouns. > > NB. Mike Day > NB. 6/25/15 > > > load'viewmat' > > 'BLACK BLUE GREEN CYAN RED MAGENTA YELLOW WHITE'=:#:i.8 > > msc=:mysquarecolours =: 3 : 0 > : > nsteps =. x > 'A B C D' =. y > lamda =. (,:~-.)@:(%~ i.@>:) nsteps > AB =. lamda +/@:(*/"1) A,:B NB. mix of colours between corners A & B CD =. > lamda +/@:(*/"1) D,:C NB. mix of colours between corners C & D > 1 0 2 |: <.255 * lamda +/@:(*/"1) AB,:CD NB. transpose 'cos I got the order > wrong! > ) > mycube=: 3 : 0 > : > nsteps =. 2 >. <: x > 'A B C D H G F E' =. y > BLANK =. < BLACK;BLACK;BLACK;BLACK > FRONT =. < A;B;C;D > BACK =. < H;G;F;E > TOP =. < E;F;B;A > LEFT =. < H;E;A;D > RIGHT =. < F;G;C;B > BASE =. < D;C;G;H > plan =. BASE(<3 1)}FRONT(<2 1)}(LEFT,TOP,RIGHT)1}BACK(<0 1)}4 3$BLANK > colours =. ,/,/>,"_1 each/"1 nsteps mysquarecolours each plan colours > viewmat i.($plan)*nsteps+1 > ) > 30 mycube BLACK,BLUE,WHITE,GREEN,RED,YELLOW,CYAN,:MAGENTA > > > > > > > -- > (B=) > ---------------------------------------------------------------------- > 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