To fully understand an expression like Joey'a you can make a series of
steps. See if you can do these mentally and then run the script to see how
you did. Think of it as an early morning workout.
i.2 3 4
;i.2 3 4
;"0 i.2 3 4
;"1 i.2 3 4
;"2 i.2 3 4
;"3 i.2 3 4
;"4 i.2 3 4
;"23 i.2 3 4
,./;"0 i.2 3 4
,./;"1 i.2 3 4
,./;"2 i.2 3 4
,./;"3 i.2 3 4
,,/;"4 i.2 3 4
,./;"23 i.2 3 4
Linda
-----Original Message-----
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Joey K Tuttle
Sent: Saturday, August 1, 2015 1:21 AM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Trouble making patter for a color cube
,./;"1|: ALL2
On 2015/07/31 21:36 , Linda Alvord wrote:
> How can I remove the data from these boxes so that only a 20x15 table
> in the same order as this would be if the boxes were removed?
>
>
>
> ]ALL2=:4 3$(<"2) 0 25 0 50 75 0 0 100 125 0 150 0(+"0 2)i.5 5
>
> ---------------T-------------------T-------------------┐
> │ 0 1 2 3 4│25 26 27 28 29 │ 0 1 2 3 4 │
> │ 5 6 7 8 9│30 31 32 33 34 │ 5 6 7 8 9 │
> │10 11 12 13 14│35 36 37 38 39 │10 11 12 13 14 │
> │15 16 17 18 19│40 41 42 43 44 │15 16 17 18 19 │
> │20 21 22 23 24│45 46 47 48 49 │20 21 22 23 24 │
> +--------------+-------------------+-------------------+
> │50 51 52 53 54│75 76 77 78 79 │ 0 1 2 3 4 │
> │55 56 57 58 59│80 81 82 83 84 │ 5 6 7 8 9 │
> │60 61 62 63 64│85 86 87 88 89 │10 11 12 13 14 │
> │65 66 67 68 69│90 91 92 93 94 │15 16 17 18 19 │
> │70 71 72 73 74│95 96 97 98 99 │20 21 22 23 24 │
> +--------------+-------------------+-------------------+
> │ 0 1 2 3 4│100 101 102 103 104│125 126 127 128 129│ │ 5 6 7 8
> 9│105 106 107 108 109│130 131 132 133 134│
> │10 11 12 13 14│110 111 112 113 114│135 136 137 138 139│
> │15 16 17 18 19│115 116 117 118 119│140 141 142 143 144│
> │20 21 22 23 24│120 121 122 123 124│145 146 147 148 149│
> +--------------+-------------------+-------------------+
> │ 0 1 2 3 4│150 151 152 153 154│ 0 1 2 3 4 │
> │ 5 6 7 8 9│155 156 157 158 159│ 5 6 7 8 9 │
> │10 11 12 13 14│160 161 162 163 164│10 11 12 13 14 │
> │15 16 17 18 19│165 166 167 168 169│15 16 17 18 19 │
> │20 21 22 23 24│170 171 172 173 174│20 21 22 23 24 │
> L--------------+-------------------+--------------------
>
>
>
> Linda
>
>
>
> -----Original Message-----
>
>
>
> L
> From: <mailto:programming-boun...@forums.jsoftware.com>
programming-boun...@forums.jsoftware.com
> [ <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda
> Alvord
> Sent: Wednesday, July 29, 2015 3:14 AM
> To: <mailto:programm...@jsoftware.com> programm...@jsoftware.com
> Subject: Re: [Jprogramming] Trouble making patter for a color cube
>
>
>
>
>
>
>
> ]RGB=:255*#:i.8
>
> RGB viewmat i.8
>
> ]GRB=:1 0 2{"1 RGB
>
> GRB viewmat i.8
>
>
>
>
>
> -----Original Message-----
>
> From: < <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com>
> <mailto:programming-boun...@forums.jsoftware.com>
programming-boun...@forums.jsoftware.com
>
> [ < <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com>
> <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda
> Alvord
>
> Sent: Wednesday, July 29, 2015 3:10 AM
>
> To: < <mailto:programm...@jsoftware.com>
mailto:programm...@jsoftware.com> <mailto:programm...@jsoftware.com>
programm...@jsoftware.com
>
> Subject: Re: [Jprogramming] Trouble making patter for a color cube
>
>
>
> This is still the most convincing argument for changing RGB to GrB.
>
>
>
> The values from dark to light are correct.
>
>
>
> Linda
>
>
>
> -----Original Message-----
>
> From: < <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com>
> <mailto:programming-boun...@forums.jsoftware.com>
programming-boun...@forums.jsoftware.com
>
> [ < <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com>
> <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda
> Alvord
>
> Sent: Wednesday, July 29, 2015 1:35 AM
>
> To: < <mailto:programm...@jsoftware.com>
mailto:programm...@jsoftware.com> <mailto:programm...@jsoftware.com>
programm...@jsoftware.com
>
> Subject: Re: [Jprogramming] Trouble making patter for a color cube
>
>
>
> Here's what I got from your first cube patern using colors.
>
>
>
> 12 9$256 256 256 #."1 colors
>
> 0 0 0 0 0 16711680 16711743 16711807
>
> 16711871
>
> 16711935 0 0 0 0 0 0 0
>
> 0
>
> 0 0 12517376 12517439 12517503 12517567 12517631 0
>
> 0
>
> 0 0 0 0 0 0 0 0
>
> 8323072
>
> 8323135 8323199 8323263 8323327 0 0 0 0
>
> 0
>
> 0 0 0 0 0 4128768 4128831 4128895
>
> 4128959
>
> 4129023 0 0 0 0 0 0 0
>
> 0
>
> 0 0 0 63 127 191 255 0
>
> 0
>
> 0 0 0 16711680 12517376 8323072 4128768 0
>
> 0
>
> 63 127 191 255 255 4129023 8323327 12517631
>
> 16711935
>
> 16727808 12533504 8339200 4144896 16128 16128 16191 16255
>
> 16319
>
> 16383 16383 4145151 8339455 12533759 16728063 16744192 12549888
>
> 8355584
>
>
>
> The top portion of the image is all very dark, but there are some very
> large numbers in the top portion of the data. The first column (red)
> is the more valuable than the second column (green) so the pattern
> does not preserve value (light and dark)
>
>
>
> Linda
>
>
>
> -----Original Message-----
>
> From: < <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com>
> <mailto:programming-boun...@forums.jsoftware.com>
programming-boun...@forums.jsoftware.com
>
> [ < <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com>
> <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Raul
> Miller
>
> Sent: Tuesday, July 28, 2015 11:17 PM
>
> To: Programming forum < < <mailto:programm...@jsoftware.com>
mailto:programm...@jsoftware.com>
> <mailto:programm...@jsoftware.com> programm...@jsoftware.com>
>
> Subject: Re: [Jprogramming] Trouble making patter for a color cube
>
>
>
> White will be the biggest number.
>
>
>
> --
>
> Raul
>
>
>
>
>
> On Tue, Jul 28, 2015 at 10:12 PM, Linda Alvord <
> < <mailto:lindaalv...@verizon.net> mailto:lindaalv...@verizon.net>
<mailto:lindaalv...@verizon.net> lindaalv...@verizon.net>
>
> wrote:
>
>> Raul, After using this code with cube 3 try this.
>> 12 9$256 256 256 #."1 paint
>> 0 0 0 16711935 16711807 16711680 0 0
> 0
>
>> 0 0 0 16744447 16744319 16744192 0 0
> 0
>
>> 0 0 0 16777215 16777087 16776960 0 0
> 0
>
>> 16711935 16744447 16777215 16777215 16777087 16776960 0 0
> 0
>
>> 8323327 8355839 8388607 8388607 8388479 8388352 0 0
> 0
>
>> 255 32767 65535 65535 65407 65280 0 0
> 0
>
>> 0 0 0 65535 65407 65280 65280 8388352
> 16776960
>
>> 0 0 0 32767 32639 32512 32512 8355584
> 16744192
>
>> 0 0 0 255 127 0 0 8323072
> 16711680
>
>> 0 0 0 255 127 0 0 0
> 0
>
>> 0 0 0 8323327 8323199 8323072 0 0
> 0
>
>> 0 0 0 16711935 16711807 16711680 0 0
> 0
>
>> When I interchange rgb for grb I can tell where the biggest numbers
>> in a viewmat are. Can you using rgb? All I have done here is take
>> each color triple in thecube pattern viewmat and converted it to its
>> :real countsing number in the 256^3 position in the more than 16
>> million numbers. The
> white
>
>> area can be spoted pretty easily.
>> Linda
>> -----Original Message-----
>> From: < <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com>
> <mailto:programming-boun...@forums.jsoftware.com>
programming-boun...@forums.jsoftware.com
>
>> [ < <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com>
> <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Raul
>
>> Miller
>> Sent: Tuesday, July 28, 2015 4:12 PM
>> To: Programming forum < < <mailto:programm...@jsoftware.com>
mailto:programm...@jsoftware.com>
> <mailto:programm...@jsoftware.com> programm...@jsoftware.com>
>
>> Subject: Re: [Jprogramming] Trouble making patter for a color cube I
>> think this is what you are asking for:
>> load 'viewmat'
>> 'E B G C R M Y W'=:#:i.8
>> V=:<E;E;E
>> FRONT=:<M;R;W
>> LEFT=:<M;W;B
>> TOP=:<W;Y;C
>> BACK=:<C;G;B
>> RIGHT=:<G;Y;E
>> BASE=:<B;E;M
>> face=: 4 :0
>> 'O X Y'=.y
>> brush=.D=: <.255*O+"1](%x-1)*((i.x)*/Y-"1 O)+"1/(i.x)*/X-"1 O
>> )
>> cube=: 3 :0
>> plan=: 4 3$V,FRONT,V,LEFT,TOP,V,V,BACK,RIGHT,V,BASE,V
>> paint=:,/,/>,"_1 each/"1 C=:y face each plan
>> paint viewmat i.4 3*y
>> )
>> cube 5
>> Personally, I prefer ('rgb' viewmat image), but your approach can
> certainly
>
>> be made to work.
>> Thanks,
>> --
>> Raul
>> On Tue, Jul 28, 2015 at 3:25 PM, Linda Alvord <
>> < <mailto:lindaalv...@verizon.net> mailto:lindaalv...@verizon.net>
<mailto:lindaalv...@verizon.net> lindaalv...@verizon.net>
>> wrote:
>>> Here's how far I got translating it to Raul's method. I can't
>>> generalize
>> to
>>> nxn squares.
>>> load 'viewmat'
>>> 'E B G C R M Y W'=:#:i.8
>>> V=:<E;E;E
>>> FRONT=:<M;R;W
>>> LEFT=:<M;W;B
>>> TOP=:<W;Y;C
>>> BACK=:<C;G;B
>>> RIGHT=:<G;Y;E
>>> BASE=:<B;E;M
>>> face=: 3 :0
>>> 'O X Y'=.y
>>> brush=.D=: <.255*O+"1]0.5*((i.3)*/Y-"1 O)+"1/(i.3)*/X-"1 O
>>> )
>>> cube=: 3 :0
>>> plan=:4 3$V,FRONT,V,LEFT,TOP,V,V,BACK,RIGHT,V,BASE,V
>>> paint=:,/,/>,"_1 each/"1 C=:face each plan paint viewmat i.12 9
>>> )
>>> cube ''
>>> Linda
>>> -----Original Message-----
>>> From: < <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com>
> <mailto:programming-boun...@forums.jsoftware.com>
programming-boun...@forums.jsoftware.com
>
>>> [ < <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com>
> <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda
>
>> Alvord
>>> Sent: Tuesday, July 28, 2015 3:05 PM
>>> To: < <mailto:programm...@jsoftware.com>
mailto:programm...@jsoftware.com> <mailto:programm...@jsoftware.com>
programm...@jsoftware.com
>>> Subject: Re: [Jprogramming] Trouble making patter for a color cube
>>> Here's my latest which folds so the base has blue riht, red forward
>>> and green up. Then the upper right front corner is white.
>>> 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'
>>> )
>>> ColorCube 30
>>> I think only one line wrapped. Another email follows With Raul's
>>> style which I can't generalize to nxn squares.
>>> Linda
>>> -----Original Message-----
>>> From: < <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com>
> <mailto:programming-boun...@forums.jsoftware.com>
programming-boun...@forums.jsoftware.com
>
>>> [ < <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com>
> <mailto:programming-boun...@forums.jsoftware.com>
mailto:programming-boun...@forums.jsoftware.com] On Behalf Of David
>
>> Lambert
>>> Sent: Tuesday, July 28, 2015 1:09 PM
>>> To: programming < < <mailto:programm...@jsoftware.com>
mailto:programm...@jsoftware.com>
> <mailto:programm...@jsoftware.com> programm...@jsoftware.com>
>
>>> Subject: Re: [Jprogramming] Trouble making patter for a color cube
>>> This delightful color cube! I rotated one of the arms so the
>>> pattern
>> won't
>>> look like a cross, which is beside the point.
>>> Has anyone yet virtually folded the image for display in perspective
>>> on opengl? I need a color chooser and this looks more fun than a
>>> flat
>> display.
>>> With 5% probability I'll undertake the task but as it happens my
>>> understanding of homogeneous coordinates doesn't translate directly
>>> to "knowing how to use opengl".
>>> boxdraw_j_ 1
>>> 4 3$<' ' NB. with simple editing, fixed width font please
>>> +--+
>>> | |
>>> +--+--+
>>> | | |
>>> +--+--+--+
>>> | | |
>>> +--+--+
>>> | |
>>> +--+
>>> --------------------------------------------------------------------
>>> -
>>> - For information about J forums see
>>> < <http://www.jsoftware.com/forums.htm>
http://www.jsoftware.com/forums.htm>
> <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>
> <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>
> <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>
> <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>
> <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>
> <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>
> <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>
> <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>
> <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>
http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm