MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Can Mathematica draw overlapping shapes with blended color?


Hello (again)!

I posted a similar message earlier, but it didn't seem to make
it to the newsgroups.

I wonder if I can draw two overlapping shapes each filled with
a different color and make the overlapping region to have the
blending color of those of the two shapes.  In other words,
can I fill shapes with transparent colors (ink) rather than
opaque colors (ink)?

For example, I could do

In[1]:= Show[Graphics[{RGBColor[0.5, 0.0, 0.0],
                       Polygon[{{0,0}, {0,2}, {2,2}, {2,0}}]}]];

In[2]:= Show[Graphics[{RGBColor[0.0, 0.0, 0.5],
                       Polygon[{{1,1}, {1,3}, {3,3}, {3,1}}]}]];

In[3]:= Show[Out[1], Out[2]];

But the color in the overlapping square area is
RGBColor[0.0, 0.0, 0.5].

Thank you all!

Xiangdong Liu


  • Prev by Date: Re: array generated
  • Next by Date: TableForm Question
  • Previous by thread: Re: Is color overlapping possible with Mathematica?
  • Next by thread: Re: Can Mathematica draw overlapping shapes with blended color?