Bill, Here are the changes.
        
load 'viewmat'
N=:<.63.75*i.5
W=:5 5$150
R=:5 5$(4#150),0
L=:|:|.|:R
f=:(0=#:i.8)+2*#:i.8
g=:((4#0),N),.N,4#255
h=:,#:i.8
BIGBOX=:<"2 |:"2 >"0(<"2)  8 3 9$,|:h{"1 g
'BLACK BLUE RED MAGENTA GREEN CYAN YELLOW WHITE'=:>BIGBOX
WHITE=:5 5$150
LMAGENTA=:8 7 6 5 4{"2 MAGENTA
LCYAN=:8 7 6 5 4{"2  CYAN
LYELLOW=:8 7 6 5 4{"2 YELLOW
A=:i.5 5
BACK=:25 3$, (0 1 2 3 4{GREEN)+"1/(0 1 2 3 4){BLUE
LEFT=:25 3$,(0 1 2 3 4{GREEN)+"1/(0 1 2 3 4){RED
TOP=:25 3$,(0 1 2 3 4{RED)+"1/(0 1 2 3 4){BLUE
FRONT=:(25 3$,LYELLOW <."1/LMAGENTA)
RIGHT=:25 3$,LCYAN <."1/LMAGENTA
BASE=:(25 3$,LYELLOW<."1/LCYAN)
WOW1=:(R,.(|.A),.L),((|:|.25+A),.(50+A),.W)
WOW2=:WOW1,((|.R),.(|.|:|.75+A),.|.|:100+A)
WOW3=:WOW2,(W,.(|:|.125+A),.L),"2,5(#"0) 150 0 150 
ALL=:BACK,LEFT,TOP,FRONT,RIGHT,BASE(,"2) 510 510 510 
ALL viewmat WOW3;'Color Cube'

Thanks again, It is nice to have it done!  Linda


-----Original Message-----
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda Alvord
Sent: Thursday, July 2, 2015 2:15 AM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Trouble making patter for a color cube

I tried <. In each of the three light mixes and the pattern looks good. (>.
Is too much light  and all square turn white)

I can even explain it pretty well. For the full collors, turning on two
lights at a time, adds light so +s works.  However, to get the lighter hues
you have added extra light to both colors so adding can be too much and it
seems that the lesser of the pair stays in the acceptable range. Thus all
those numbers up to 510 are legitimate colors for a viewmat palette.  Does
that seem reasonable as an explanation to you?

Linda

-----Original Message-----
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of bill lam
Sent: Wednesday, July 1, 2015 9:17 PM
To: Programming forum
Subject: Re: [Jprogramming] Trouble making patter for a color cube

Perhaps you could also experiment other formulae for color addition instead
of using +,  try >.  eg
 BASE=:25 3$,LYELLOW>."1/LCYAN
----------------------------------------------------------------------
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

Reply via email to