I'm currently doing some research in the field of continuum percolation, and I need to create relevant diagrams according to the following specifications:

  1. The diagram consists of three circles of shown separation distances and radii.
  2. When the circles overlap, I'd like the intersecting areas to be highlighted.

Something like this is ideal:

This is what I'd like to make, but it'd be better if the two halves of the orange region were also labelled (and green region). L1 and L2 are the separation distances. The C's are just labels. The r's are the radii.


I've derived equations of the total area for a 3-circle system given the parameters mentioned above. The derivation utilizes constructs like overlapping areas as well as those parameters.


I have very little direction on where to begin to render these diagrams. I know Tikz is the starting point.


What specific constructs within Tikz can help me render the diagrams adhering to the specifications above? Any guidance is greatly appreciated.

  • 2
    I'm not sure what these diagrams would even look like. Could you post an image: even a hand-drawn image would be helpful for us to give guidance with. – A.Ellett Jan 25 '16 at 21:56
  • @A.Ellett I updated the original post with a picture of what would be ideal. – Jeesubmyunu Jan 26 '16 at 3:46

Taking some liberties (as pointed out in the comments, we don't know exactly what you are after) here is a quick implementation. The centers and radii of the circles are declared as commands and then the \clip command is used to build the intersecting regions, which are filled.


\newcommand{\circleA}{(0cm,0cm) circle (1cm)}
\newcommand{\circleB}{(3cm,3cm) circle (4cm)}
\newcommand{\circleC}{(-1cm,1cm) circle (2cm)}
        \begin{scope}%fill for AB
            \fill[red] \circleB;
        \begin{scope}%fill for AC
        \begin{scope}%fill for BC
            \clip \circleB;
            \fill[green] \circleC;
        \begin{scope}%fill for ABC
            \clip \circleA;
            \clip \circleB;
            \fill[blue] \circleC;
        \draw \circleA;
        \draw \circleB;
        \draw \circleC;


  • This is a great start. I would just need to add radii, separation distances, and labels. I updated the original post with a picture of what would be ideal. – Jeesubmyunu Jan 26 '16 at 3:46

Just to point out an alternative to "I know Tikz is the starting point." Here is an approach using Metapost as part of LuaLaTeX and the luamplib package. Compile with lualatex.

enter image description here

\setmainfont{Helvetica Neue}
\mplibtextextlabel{enable} % this allows plain labels to use LaTeX fonts
      % define three circles
      path C[];
      C1 = fullcircle scaled 100 rotated 90;
      C2 = fullcircle scaled 100 shifted 89 down;
      C3 = fullcircle scaled  64 rotated 90 shifted 64 right;

      % colour the overlaps
      fill buildcycle(C1, C3) withcolor red+1/2green;
      fill buildcycle(C1, C2) withcolor 1/2red+green;

      % draw the separations
      draw center C1 -- center C2 withcolor 1/2 green;
      draw center C1 -- center C3 withcolor 1/2 green;

      % draw radius, circumference and mark centre, for each circle
      forsuffixes $=1,2,3:
        draw center C$ -- point 0 of C$ withcolor red;
        draw C$           withpen pencircle scaled 3; 
        drawdot center C$ withpen pencircle scaled 4;

      % add some labels
      label("C1", 1/2[center C1, point 1.5 of C1]);
      label("C2", 1/2[center C2, point 6   of C2]);
      label("C3", 1/2[center C3, point 6   of C3]);

      label.rt ("r1",2/3[center C1, point 0 of C1]) withcolor 2/3 red;
      label.top("r2",2/3[center C2, point 0 of C2]) withcolor 2/3 red;
      label.rt ("r3",2/3[center C3, point 0 of C3]) withcolor 2/3 red;

      label.top("L1", 1/4[center C1, center C3]) withcolor 1/3 green;
      label.lft("L2", 1/4[center C1, center C2]) withcolor 1/3 green;


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.