Mike, First, I put the image into word or photoshop and then stretch it to a
full page before printing  it. The tabs seem ok in size. I just can't get my
fingers inside the cube for the last one or two.

I went back and got your 7/7 version and each time I am understanding how it
works  a little  better.

When you make a pattern of this cube to represent the colors of  light, in
one plane black to full blue forms one dimension. Black to red the second
dimension and the color when both are lit is full magenta. The third
dimension starts at black an goes to red. The red and green plane makes
yellow light.  The red and green plane makes cyan. Now in the diagonally
opposite corner of the cube all three lights are on full so that that corner
must be white.

Interestingly, if you start from the white corner, yellow and magenta make
red, yellow and cyan make green and cyan and magenta make blue. So that is
how the printer makes all colors from yellow, cyan and magenta (with healthy
doses of black)

I like all the ways you use random selection and your final images are quite
delightful. I'm still slowly coming to terms with the net approach and I
started from an analysis of light. So, I'll let you know more about your
strategy as I understand it better.

Linda


-----Original Message-----
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of
mike_liz....@tiscali.co.uk
Sent: Monday, July 13, 2015 12:39 PM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Trouble making patter for a color cube

Yes,  it's very satisfying, isn't it.  

Mind you,  your sticky tabs
probably need to have a
more practical size when N is >> 5  !

Did you
see my more recent offering re user-specified nets?  (7/7/15) Perhaps not
elementary enough for your demonstration project/s. 


Cheers,


Mike

On 13/07/2015 14:09, Linda Alvord wrote:
> load 'viewmat'
> 
ColorCube=: 3 : 0
> N=:y
> G=:<.(i.N)*255%<: N
> A=:#:i.8
> B=:(((<:N)
#0),G),.G,(<:N)#255
> BIGBOX=:<"2(|."2)1 0 2{"1(|:"2)(8 3 ,<:2*N)$,|:(,
A){"1 B
> 'BLACK BLUE RED MAGENTA GREEN CYAN YELLOW WHITE'=:>BIGBOX
> 
LYELLOW=:(i.N){"2 YELLOW
> LCYAN=:(i.N){"2  CYAN
> LMAGENTA=:(i.N){"2
MAGENTA
>    GREEN=:((<:N)+i.N){"2 GREEN
> RED=:((<:N)+i.N){"2 RED
> 
BLUE=:((<:N)+i.N){"2 BLUE
> BACK=:((*:N), 3)$,LMAGENTA<."1/LYELLOW
> 
TOP=:((*:N), 3)$,LCYAN<."1/LYELLOW
> LEFT=:((*:N), 3)$,LMAGENTA<."
1/LCYAN
> FRONT=:((*:N), 3)$,GREEN+"1/BLUE
> RIGHT=:((*:N), 3)$,GREEN+"
1/RED
> BASE=:((*:N), 3)$,RED+"1/BLUE
> F=:i.2#N
> T=:(<:6*N^2),((<:N),
N)$0
> L=:|:T
> R=:|:|.T
> WOW1=:(R,.(|.F),.L),((|:|.(N^2)+F),.((2*N^2)
+F),.|.T)
> WOW2=:WOW1,(T,.((3*N^2)+F),.|:|.|:(4*N^2)+F)
> WOW3=:WOW2,
(R,.(|.(5*N^2)+F),.L),"2,N(#"0) 0, (6*N^2), 0 
> ALL=:BACK,LEFT,TOP,
FRONT,RIGHT,BASE(,"2)0 0 0
> ALL viewmat WOW3;'Color Cube')
> )

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