The problem is not that it needs flipping.  It iss that the last two faces are 
not correct in the last two lines.  The coloration should be consistent.

If the code works for four colors but notfor ones using YELLOW something seems 
to be wrong.

Linda

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of bill lam
Sent: Saturday, June 13, 2015 2:04 AM
To: [email protected]
Subject: Re: [Jprogramming] Trouble making patter for a color cube

if the bottom face needs flipping, change the 3 lines from

> wd 'bin hz'
> wd 'cc bottom image;set bottom image ',jpath '~temp/BOTTOM.png'
> wd 'bin hzhz'

to

> wd 'bin hzhzhz'
> wd 'cc bottom image;set bottom image ',jpath '~temp/BOTTOM.png'

or other variations.

Сб, 13 июн 2015, bill lam написал(а):
> I don't think there are any bugs in viewmat that are related to your 
> problem. I don't understand your code, the following is a jqt template 
> to display the 6 faces of a cube.
> 
> Beware line wrapping.
> 
> load 'viewmat'
> 
> run_test=: 3 : 0
> 
> VISIBLE_jviewmat_=: 0
> GUI_jviewmat_=: 0
> 
> N=:<.63.8*i.5
> BLACK=:9 3$0
> BLUE=:(2#"1,.(4#0),N),.N,4#255
> RED=:(N,4#255),.2#"1,.(4#0),N
> MAGENTA=:(N,4#255),.((4#0),N),.N,4#255
> GREEN=:((4#0),N),.(N,4#255),.(4#0),N
> CYAN=:((4#0),N),.2#"1 ,.N,4#255
> YELLOW=:(2#"1 ,.N,4#255) ,.(4#0),N
> WHITE=:9 3$255
> (#:i.8);'BLACK','BLUE','RED','MAGENTA','GREEN','CYAN','YELLOW',:'WHITE'
> A=:<.0.5*(i.5 5)+i.5 5
> BLANK=:25 3$255
> BACK=:25 3$,><"1 (0 1 2 3 4{GREEN)+"1/(0 1 2 3 4){BLUE BACK viewmat 
> A;'BACK'
> NB. (BACK,BLANK)viewmat (25+A),.|.A
> TOP=:25 3$,><"1 (0 1 2 3 4{RED)+"1/(0 1 2 3 4){BLUE TOP viewmat 
> A;'TOP'
> LEFT=:25 3$,><"1 (0 1 2 3 4{GREEN)+"1/(0 1 2 3 4){RED LEFT viewmat 
> A;'LEFT'
> NB. (TOP,LEFT) viewmat (25+|:|.A),.A
> NB. ((TOP,LEFT) viewmat (25+|:|.A),.A),.(BACK,BLANK)viewmat 
> (25+A),.|.A
> RIGHT=:R=:25 3$,><"1 P=:(8 7 6 5 4{CYAN)+"1/(8 7 6 5 4){MAGENTA RIGHT 
> viewmat A;'RIGHT'
> FRONT=:S=:25 3$,><"1 Q=:(8 7 6 5 4{YELLOW)+"1/(8 7 6 5 4){MAGENTA 
> FRONT viewmat A;'FRONT'
> BOTTOM=:25 3$,><"1 (8 7 6 5 4{CYAN)+"1/(8 7 6 5 4){YELLOW BOTTOM 
> viewmat A;'BOTTOM'
> 
> VISIBLE_jviewmat_=: 1
> GUI_jviewmat_=: 1
> 
> wd 'pc test closeok'
> wd 'bin g'
> wd 'grid size 3 4'
> wd 'bin hz'
> wd 'cc top image;set top image ',jpath '~temp/TOP.png'
> wd 'bin hzhz'
> wd 'cc left image;set left image ',jpath '~temp/LEFT.png'
> wd 'cc front image;set front image ',jpath '~temp/FRONT.png'
> wd 'cc right image;set right image ',jpath '~temp/RIGHT.png'
> wd 'cc back image;set back image ',jpath '~temp/BACK.png'
> wd 'bin hz'
> wd 'cc bottom image;set bottom image ',jpath '~temp/BOTTOM.png'
> wd 'bin hzhz'
> wd 'bin z'
> wd 'pshow'
> wd 'pmove 0 0 300 400'
> 
> )
> 
> run_test''
> 
> 
> 
> --
> regards,
> ====================================================
> GPG key 1024D/4434BAB3 2008-08-24
> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 gpg --keyserver 
> subkeys.pgp.net --armor --export 4434BAB3

--
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

Reply via email to