Here are the two flags we have so far. Try running this in JHS.
load 'viewmat'
GRB=:1 0 2{"1 (#:i.8){0 255
B=:7(2 2;2 2)}A=:5 5$1
$C=: ".31$'B,.A,.'
$D=: ".31$'A,.B,.'
$E=:0,"1".17$'C,D,'
NB. David Lambert
STARS =: 7(#"1)7#0 1}.E
SHAPE =: 13r7 2 (* $) STARS
STRIPES =: (13%~{.SHAPE)#(<:{:SHAPE)#"1,.13$2 7
FLAG =: 0,.(,STARS) ((<"1)4$.$.STARS)}STRIPES
GRB viewmat FLAG;'DAVID L'
NB.Michal Wallace
'k b w r' =: 0 1 7 2 NB. black/blue/white/red
box=:({.,~{.,~{.,{.,])}."1 E
top=:(7*7)$,.7# r,w
bot=:(8*7)$,.7# w,r
bot=:(6*7)$,.7# w,r
flg=:box ,. (n=:100)#"1 top
flg=:flg,(n + #|:box)#"1 bot
pic=:(k,k,|:@|.)^:4 flg
GRB viewmat pic;'MICHAL W'
Michal, What country do you claim as your own? Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Michal
Wallace
Sent: Thursday, December 4, 2014 12:46 PM
To: [email protected]
Subject: Re: [Jprogramming] If these are the stars, can you add the stripes?
D'oh. I obviously live in an alternate universe where the USA was founded by
15 colonies.
For the rest of you:
bot=:(6*7)$,.7# w,r NB. 6 more stripes
2014-12-04 11:36 GMT-06:00 Michal Wallace <
<mailto:[email protected]> [email protected]>:
> NB. starting with E from Linda's program...
>
>
> 'k b w r' =: 0 1 7 2 NB. black/blue/white/red
>
>
> box=:({.,~{.,~{.,{.,])}."1 E NB. make blue area 49 px high
>
>
> top=:(7*7)$,.7# r,w NB. 7 stripes, each 7 px high
>
>
> bot=:(8*7)$,.7# w,r NB. 8 more stripes
>
>
> flg=:(box ,. (n=:100)#"1 top) NB. put it all together
>
> flg=:flg,(n + #|:box)#"1 bot
>
>
> pic=:(k,k,|:@|.)^:4 flg NB. re-add the black border
>
>
> GRB viewmat pic
>
>
>
> On Tue, Dec 2, 2014 at 3:10 AM, Linda Alvord <
<mailto:[email protected]> [email protected]>
> wrote:
>
>> load 'viewmat'
>>
>> GRB=:1 0 2{"1 (#:i.8){0 255
>>
>>
>>
>> B=:7(2 2;2 2)}A=:5 5$1
>>
>> $C=: ".31$'B,.A,.'
>>
>> $D=: ".31$'A,.B,.'
>>
>> $E=:0,"1".17$'C,D,'
>>
>>
>>
>> GRB viewmat E
>>
>>
>>
>> Linda
>>
>>
>>
>> ---------------------------------------------------------------------
>> - For information about J forums see
>> <http://www.jsoftware.com/forums.htm>
http://www.jsoftware.com/forums.htm
>>
>
>
----------------------------------------------------------------------
For information about J forums see <http://www.jsoftware.com/forums.htm>
http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm