[NTG-context] Venn diagram

David Arnold dwarnold45 at cox.net
Fri Jan 20 06:08:33 CET 2006


All,

I have:

\startMPpage   %figure library name: intersection

   %initialize scale
   numeric u; 10u=3in;

   %ellipses
   path A, B;
   A:=fullcircle xyscaled (4u,3u);
   B:=A shifted (2u,0);
   draw A withcolor red;
   label.ulft(btex $A$ etex, point 3 of A) withcolor red;
   draw B withcolor blue;
   label.urt(btex $B$ etex, point 1 of B) withcolor blue;

   %bounding box
   draw bbox currentpicture enlarged (0.5u,0.5u);

\stopMPpage

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

Thanks


More information about the ntg-context mailing list