Re: RGBColor [?,?,?]
- To: mathgroup at smc.vnet.net
- Subject: [mg30863] Re: RGBColor [?,?,?]
- From: "Paul Lutus" <nospam at nosite.zzz>
- Date: Fri, 21 Sep 2001 04:04:01 -0400 (EDT)
- References: <9oc8uf$g6r$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"eugene777" <eugene777 at freemail.absa.co.za> wrote in message news:9oc8uf$g6r$1 at smc.vnet.net... > Hello, > Imagine Leonardo Da Vinci in mixing paints (colors), but he has only > Mathematica for this reason. > He knows yellow mixed with blue forms green and denotes: > RGBColor[1,1,0] + RGBColor[0,0,1] = RGBColor[0,1,0] > He knows red mixed with yellow forms orange and denotes: > RGBColor[1,0,0] + RGBColor[1,1,0] = RGBColor[1,.5,0] > ... and generally he denotes: > RGBColor[r1,g1,b1] + RGBColor[r2,g2,b2] = RGBColor[r3,g3,b3] > > Now he needs to put a detail on the picture colored RGBColor[.375,.988,.164] > but he does not know which colors to mix. So he needs an algorithm. He wants > to know and the opposite ? mixing any two or more colors what will be the > resulting color. > * Question1*: > RGBColor[r1,g1,b1] + RGBColor[r2,g2,b2] = RGBColor[?,?,?] > ** Question2 **: > RGBColor[r3,g3,b3] = RGBColor[?,?,?] + RGBColor[?,?,?] > > ******************************************************* > Two overlapped disks result three sectors: {1,2,12}. > Three overlapped disks result maximum seven sectors {1,2,3,12,13,23,123}. > *** Question3 ***(graphical) : > I ask you how could I plot few randomly overlapped figures (say disks) to > display these overlapped sectors with there resulting (mixed) color? Your basic premise is unfortunately not appropriate to radiant colors. You are discussing the rules for mixing paints, but mixing radiant colors does not work that way. If you mix red, blue and green paint, you get black. If you mix red, blue and green radiant colors, you get white. Granted this, a first step would be to add the individual colors and divide by 2. result color: zr = (xr + yr) / 2 zg = (xg + yg) / 2 zb = (xb + yb) / 2 But imitating the behavior of paints using radiant colors will be much more difficult. -- Paul Lutus www.arachnoid.com