My intent was far simpler. First I did not mean color as in the pronoun containing RGB values or any other color space representation.
A verb color could (for the sake of simplicity) be represented by < the box verb. color=.< Then, say we build a tile floor represented by a boolean (white and black tiles) as in: tiles=.10 10$,(10$0 1),:10$1 0 You can then color it (using the above convention) by doing: color tiles (or color"2 tiles) color"1 tiles color"0 tiles Now for more fun one would like to actually change the color of those tiles so let's see: color -. tiles (for flipping the boolean) _1 color tiles (for making the whole thing 1 1 color tiles (for making the whole thing 0) Operations seems a tad limited with this color representation of a primitive verb so... Now comes the question "How would you represent a color primitive ?" Would you keep it as above ? Would you make it an adverb ? Would you make it a conjunction ? None of the above ? Does it matter ? Paul Gauthier APL Software Developer - Senior [EMAIL PROTECTED] Phone: 312-739-3467 Fax: 312-739-3496 CheckFree. The Company that Powers Payment on the WebSM. http://www.checkfree.com/paybillsonline "Raul Miller" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 04/03/2007 11:03 AM Please respond to General forum <[email protected]> To "General forum" <[email protected]> cc Subject Re: [Jgeneral] serious trouble On 4/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > While you are at it apply color using the rank operator... Now how would > you represent a color primitive ? ;O) Am I in serious trouble for taking this as a serious question? I usually implement color as a list of three floating point numbers, typically in the range of 0..1 where 0 is black, and 1 is as bright as can be. Typically, the first number represents red, the second green, and the third blue. Hypothetically speaking, you can also have numbers greater than 1 (which, from an implementation point of view, if you are modeling vision, should tend to wash out neighboring pixels and, if time is involved, should have a persistence effect -- first positive, then negative vaguely like a damped spring -- which means you could also have numbers less than 0). As for a primitive... primitive for what? Do you just want a constant function representing a specific color? -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
