[Tex/LaTex] Filling area between curve and circle using TikZ

tikz-pgf

The question is rather self-explaining. I have the picture below, and now I want to fill the two areas between the circle (arc) and the curves.

\documentclass{article}

\usepackage{tikz}

\begin{document}
\begin{tikzpicture}[thick,every node/.style={circle,scale=.5,fill}]

\draw (0,0) ++(160:3) arc (160:-160:3);

\node (e1) at (160:3) {};
\node (e2) at (-160:3) {};

\draw(e1) -- node[fill=none,left,scale=2] {$e$} (e2);

\draw plot [smooth] coordinates {(160:3) (130:2) (110:2.5) (100:2.5) (90:3)};
\draw plot [smooth] coordinates {(40:3) (30:1) (-40:1.5) (-80:3)};

\end{tikzpicture}
\end{document}

Best Answer

You can fill the area by drawing a closed path which is a combination of the curves and a corresponding arc.

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}

\begin{document}
  \begin{tikzpicture}[
    thick,
    every node/.style={
      circle,
      scale=.5,
      fill
    }
  ]
    \draw (0,0) ++(160:3) arc (160:-160:3);

    \node (e1) at (160:3) {};
    \node (e2) at (-160:3) {};

    \draw(e1) -- node[fill=none,left,scale=2] {$e$} (e2);

    \fill[cyan,draw=black] plot[smooth] coordinates {
      (160:3)
      (130:2)
      (110:2.5)
      (100:2.5)
      (90:3)
    } arc[radius=3,start angle=90,end angle=160];
    \fill[cyan,draw=black] plot[smooth] coordinates {
      (40:3)
      (30:1)
      (-40:1.5)
      (-80:3)
    } arc[radius=3,start angle=-80,end angle=40];
  \end{tikzpicture}
\end{document}

The choice of the fill color is of course left to you. The chosen one here is only for demonstration purposes.


enter image description here