0

i want to draw the following picture in tikz but i have no idea how to draw loops. Any help is appreciated.enter image description here

Here l_{0},l_{1},l_{\infinity} denotes the loops.

enter image description here

percusse
  • 157,807

1 Answers1

2
\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{calc} % shapes,arrows,shapes.multipart,positioning, fit, were not used
\usetikzlibrary{arrows.meta,bending,decorations.markings,intersections} %< added
\tikzset{% inspired by https://tex.stackexchange.com/a/316050/121799
    arc arrow/.style args={%
    to pos #1 with length #2}{
    decoration={
        markings,
         mark=at position 0 with {\pgfextra{%
         \pgfmathsetmacro{\tmpArrowTime}{#2/(\pgfdecoratedpathlength)}
         \xdef\tmpArrowTime{\tmpArrowTime}}},
        mark=at position {#1-\tmpArrowTime} with {\coordinate(@1);},
        mark=at position {#1-2*\tmpArrowTime/3} with {\coordinate(@2);},
        mark=at position {#1-\tmpArrowTime/3} with {\coordinate(@3);},
        mark=at position {#1} with {\coordinate(@4);
        \draw[-{Stealth[length=#2,bend]}]       
        (@1) .. controls (@2) and (@3) .. (@4);},
        },
     postaction=decorate,
     }
}


\begin{document}
\begin{tikzpicture}
\draw[-latex] (-2,0) -- (8,0) node[below]{$x$};
\draw[-latex] (0,-4) -- (0,4) node[left]{$y$};
\draw[arc arrow=to pos 0.75 with length 2mm] (2,0) to[out=135,in=90] (-0.5,0) 
to[out=-90,in=-135] node[midway,below,red]{$\ell_0$} cycle;
\draw[arc arrow=to pos 0.25 with length 2mm] (2,0) to[out=-45,in=-90] 
node[midway,below,red]{$\ell_1$} (4.5,0) 
to[out=90,in=45] cycle;
\draw[arc arrow=to pos 0.5 with length 2mm] (2,0) to[out=90,in=90] (5,0) 
to[out=-90,in=0] (2,-2)node[red,below]{$\ell_\infty$} to[out=180,in=-90] (-1,0) to[out=90,in=90] cycle;

\end{tikzpicture}
\end{document}

enter image description here