2

Possible Duplicate:
How to generate all possible Venn diagrams (with the case below) efficiently?

I want to shade a diagram involving three sets A, B and C. The specific region that needed to be shaded is what is in set C which is not overlapping with any of the other sets A and B. In the code below, I don't know how to exclude shading the portion which involves intersection of A, B and C.

\begin{tikzpicture}
\def \leftcircle{(0, 0) circle(1.5 cm)}
\def \rightcircle{(2cm, 0cm) circle(1.5 cm)}
\def \bottomcircle{(315:2cm) circle(1.5 cm)}

\def \cliprect {(-1.5, -3.0) rectangle (3.5, 1.5)};

\draw \cliprect;

\begin{scope}[even odd rule]
    \clip \leftcircle \rightcircle \cliprect;
    \fill[pattern=vertical lines] \bottomcircle;
\end{scope}

\draw \leftcircle node[above] {$A$};
\draw \rightcircle node[above] {$B$};
\draw \bottomcircle node[below] {$C$};

\end{tikzpicture}
Ravi
  • 59
  • 2

0 Answers0