On 1/20/06, Aditya Mahajan wrote:
> <--- On Jan 19, David Arnold wrote --->
> > I need an easy way of shading these areas:
> >
> > 1. A intersect B
> > 2. A union B
> > 3. A intersect (complement of B)
> > 4. (complement of A) intersect B
>
> There is venn.mp on ctan. Using it you can do basic shading of
> intersection, union etc for 0,1,2 or 3 sets very quickly. Read the
> documentation in source for details. For example

Thanks a lot for the very nice example;

> \startMPinclusions
>    input venn;
>    pair A,B,T[];
>    A = (.4venn_width-.5venn_circle_diameter,.5venn_height);
>    B = (.6venn_width+.5venn_circle_diameter,.5venn_height);
>    T1 = (.5venn_width , 0);
>    T2 = (.5venn_width,.5venn_height-.5venn_circle_diameter);
>    vardef venn_shade = red;

 vardef venn_shade = red enddef;

I tried the (transparent(.8,3,blue)) at that place, but it seems that
either ConTeXt or Acrobat have problems here. It either compiled, but
then Adobe Reader complained, if I tried to compile
    fill fullcircle scaled 3cm withcolor (transparent(.8,3,blue));
manually, then I got an error

**\relax venn-mpgraph.3
 (venn-mpgraph.3
! Undefined control sequence.
\handleMPspecialscommentx #1 ->\doifelse
                                         {#1}{10000}{\settrue \manyMPspecial...
l.15 %%MetaPostSpecials: 2.0 123 1000

?
Missing character: There is no 1 in font nullfont!
...

> Perhaps one can combine the transparent color functionality of
> metapost with venn.mp to get really nice colors for intersections etc.

Hans: please fix the typo on line 488 in mp-spec.mp. I copied the
example from there and wondered why it didn't work (well, it still
doesn't work - the problem described above).


Mojca
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to