child id duplicated. try this,
load 'viewmat'
RGB=:0 255{~#:i.8
GRB=:1 0 2{"1 RGB
RGB;GRB
PLUS=:-.0=*/~i:4
]A=:<.0.5*(i.8 8)+|:i.8 8
]B=:(i.8)<:/i.8
]C=:63*(i.8)>/i.8
C+B*A
PLUS=:-.0=*/~i:4
VISIBLE_jviewmat_=: GUI_jviewmat_=:0
D=.GRB viewmat PLUS;'PLUS'
E=.GRB viewmat (i.8);'TOP'
GRB viewmat (C+B*A);'BLEND'
VISIBLE_jviewmat_=: GUI_viewmat_=:1
coclass 'qtdemo'
imdemo_run=: 3 : 0
wd 'pc imdemo closeok escclose'
wd 'bin g'
wd 'grid size 2 2'
wd 'cc plus image'
wd 'cc top image'
wd 'cc side image'
wd 'cc blend image'
wd 'set plus image *' ,jpath '~temp/PLUS.png'
wd 'set top image *', jpath '~temp/TOP.png'
wd 'set side image *', jpath '~temp/SIDE.png'
wd 'set blend image *', jpath '~temp/BLEND.png'
wd 'pshow'
)
imdemo_run''
On May 21, 2015 11:47 PM, "Linda Alvord" <[email protected]> wrote:
> This almost works. The bottom two images are missing.
>
> load 'viewmat'
> RGB=:0 255{~#:i.8
> GRB=:1 0 2{"1 RGB
> RGB;GRB
> PLUS=:-.0=*/~i:4
> ]A=:<.0.5*(i.8 8)+|:i.8 8
> ]B=:(i.8)<:/i.8
> ]C=:63*(i.8)>/i.8
> C+B*A
> PLUS=:-.0=*/~i:4
> GUI_jviewmat_=:0
> D=.GRB viewmat PLUS;'PLUS'
> E=.GRB viewmat (i.8);'TOP'
> GRB viewmat (C+B*A);'BLEND'
> GUI_viewmat_=:1
>
> coclass 'qtdemo'
> imdemo_run=: 3 : 0
> wd 'pc imdemo closeok escclose'
> wd 'grid size 2 2'
> wd 'cc pic image'
> wd 'cc png image'
> wd 'cc png image'
> wd 'cc png image'
>
> wd 'set pic image *' ,jpath '~temp/PLUS.png'
>
> d=.readimg_jqtide_ jpath '~temp/TOP.png'
> d writeimg_jqtide_ jpath '~temp/TOP.png'
> wd 'set png image *', jpath '~temp/TOP.png'
>
> d1=.|: d
> d1 writeimg_jqtide_ jpath '~temp/SIDE.png'
> wd 'set png image *', jpath '~temp/SIDE.png'
>
> d2=.readimg_jqtide_ jpath '~temp/BLEND.png'
> d2 writeimg_jqtide_ jpath '~temp/BLEND.png'
> wd 'set png image *', jpath '~temp/BLEND.png'
>
> wd 'pshow'
> )
>
> imdemo_run''
>
> Linda
>
> -----Original Message-----
> From: [email protected] [mailto:
> [email protected]] On Behalf Of bill lam
> Sent: Saturday, May 16, 2015 8:46 PM
> To: [email protected]
> Subject: Re: [Jprogramming] Mixing Colors of Light
>
> Furthermore, you can suppress display by setting
>
> VISIBLE_jviewmat_=:0
>
> Сб, 16 май 2015, Linda Alvord написал(а):
> > Great! Change to viewmat (i.6);'Pretty' to get Pretty.png
> >
> > Thanks. Linda
> >
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of bill
> > lam
> > Sent: Saturday, May 16, 2015 10:22 AM
> > To: Programming forum
> > Subject: Re: [Jprogramming] Mixing Colors of Light
> >
> > try this,
> >
> > load'viewmat'
> > GUI_jviewmat_=:0
> > viewmat i.6 6
> > GUI_jviewmat_=:1
> > On May 16, 2015 10:05 PM, "Linda Alvord" <[email protected]>
> wrote:
> >
> > > This is helpful. However, a few months ago if you used viewmat in
> > > jqt the result was a copy of the image saved in temp as a png. This
> > > no longer seems to happen (and keeps temp much less cluttered.
> > > However how can you save the image in temp as a png if you do want it
> there?
> > >
> > > Linda
> > >
> > > -----Original Message-----
> > > From: [email protected] [mailto:
> > > [email protected]] On Behalf Of bill lam
> > > Sent: Tuesday, May 12, 2015 11:54 PM
> > > To: [email protected]
> > > Subject: Re: [Jprogramming] Mixing Colors of Light
> > >
> > > I don't know JHS, but grid would probably be used in jqt.
> > > Anyways I think that you need to save each viewmat in to an image
> > > file and use the file names to display those images.
> > >
> > > Вт, 12 май 2015, Linda Alvord написал(а):
> > > > Artists often mix each color in their palette with each color.
> > > > Here a GRB palette has black,blue,magenta, red,cyan,green, yellow
> and white.
> > > >
> > > >
> > > >
> > > > Using a technique similar to that used for a mileage between
> > > > cities, I remove duplicates.
> > > >
> > > >
> > > >
> > > > Run this code in JHS. Look at viewmat C+B*A. Each of the eight
> > > > colors are in the diagonal from upper left to lower right. Seven
> > > > new colors are available in the mixed colors.
> > > >
> > > >
> > > >
> > > > What I want to do is make a table of these results, but I can't
> > > > seem to capture the images and put them in boxes. Any ideas?
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > load 'viewmat'
> > > >
> > > > RGB=:0 255{~#:i.8
> > > >
> > > > GRB=:1 0 2{"1 RGB
> > > >
> > > > RGB;GRB
> > > >
> > > > GRB viewmat i.8
> > > >
> > > > ]A=:<.0.5*(i.8 8)+|:i.8 8
> > > >
> > > > GRB viewmat A
> > > >
> > > > ]B=:(i.8)<:/i.8
> > > >
> > > > ]C=:63*(i.8)>/i.8
> > > >
> > > > GRB viewmat C+B*A
> > > >
> > > > ]E=:'MIX'
> > > >
> > > > ]F=:GRB viewmat i.8
> > > >
> > > > ]G=:GRB viewmat ,.i.8
> > > >
> > > > ]H=:GRB viewmat C+B*A
> > > >
> > > > (E;F),:G;H
> > > >
> > > >
> > > >
> > > > Linda
> > > >
> > > >
> > > >
> > > > ------------------------------------------------------------------
> > > > --
> > > > -- For information about J forums see
> > > > http://www.jsoftware.com/forums.htm
> > >
> > > --
> > > regards,
> > > ====================================================
> > > GPG key 1024D/4434BAB3 2008-08-24
> > > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 gpg --keyserver
> > > subkeys.pgp.net --armor --export 4434BAB3
> > > --------------------------------------------------------------------
> > > -- 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
>
> --
> regards,
> ====================================================
> GPG key 1024D/4434BAB3 2008-08-24
> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 gpg --keyserver
> subkeys.pgp.net --armor --export 4434BAB3
> ----------------------------------------------------------------------
> 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