# How to draw closed integration contours with conjugated poles using TikZ?

I would like to illustrate in my report integration contour with a cut and four poles (two of them located on another branch) what is demonstrated on the picture below.
But I am having trouble finding a solution with TikZ. Where can I find the TikZ manuals? I would appreciate if you could indicate the code to draw this diagram.

• Welcome to TeX.-SE! TikZ & PGF Manual is part of tikz package distribution or search by google for it (it is on CTAN). Plenty of different examples you can find on texample.net. An similar example to your problem see tex.stackexchange.com/questions/342570/…. – Zarko Dec 22 '16 at 22:08

Meanwhile my welcome. Here my code for you.

\documentclass[10pt]{article}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw[->,color=black] (-4.274070623591279,0.) -- (5.125929376408718,0.);
\foreach \x in {-4.,-3.,-2.,-1.,1.,2.,3.,4.,5.}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt);
\draw[->,color=black] (0.,-4.2406536438767795) -- (0.,4.2593463561232205);
\foreach \y in {-4.,-3.,-2.,-1.,1.,2.,3.,4.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt);
\clip(-4.274070623591279,-4.2406536438767795) rectangle (5.125929376408718,4.2593463561232205);
\draw (4.,0.38831)-- (0.,0.38272727272727597);
\draw [shift={(0.,0.)}] plot[domain=1.5707963267948966:4.720026063407087,variable=\t]({1.*0.38272727272727597*cos(\t r)+0.*0.38272727272727597*sin(\t r)},{0.*0.38272727272727597*cos(\t r)+1.*0.38272727272727597*sin(\t r)});
\draw (0.,-0.38272727272727597)-- (4.00291,-0.39);
\draw [shift={(0.,0.)}] plot[domain=0.09677425870355448:6.186062722701562,variable=\t]({1.*4.018803883756957*cos(\t r)+0.*4.018803883756957*sin(\t r)},{0.*4.018803883756957*cos(\t r)+1.*4.018803883756957*sin(\t r)});
\draw(1.525929376408715,1.0593463561232204) circle (0.3cm);
\draw(1.5459293764087176,-1.1806536438767798) circle (0.3cm);
\draw [dash pattern=on 3pt off 3pt] (1.5059293764087176,1.9593463561232205) circle (0.3cm);
\draw [dash pattern=on 3pt off 3pt] (1.5659293764087177,-2.0206536438767797) circle (0.3cm);
\begin{scriptsize}
\draw [fill=black] (1.525929376408715,1.0593463561232204) circle (3.5pt);
\draw [fill=black] (1.5459293764087176,-1.1806536438767798) circle (3.5pt);
\draw [color=black] (1.5059293764087176,1.9593463561232205)-- ++(-3.5pt,-3.5pt) -- ++(7.0pt,7.0pt) ++(-7.0pt,0) -- ++(7.0pt,-7.0pt);
\draw [color=black] (1.5659293764087177,-2.0206536438767797)-- ++(-3.5pt,-3.5pt) -- ++(7.0pt,7.0pt) ++(-7.0pt,0) -- ++(7.0pt,-7.0pt);
\end{scriptsize}
\end{tikzpicture}
\end{document}

• Just out of curiosity: What purpose is served by using numbers with 16 digits of precision? Might 3 or 4 digits suffice? – Mico Dec 23 '16 at 1:24
• You're right. Three or four digits are more than enough. – Sebastiano Dec 23 '16 at 12:45
• @Mico Simply because the code is exported from GeoGebra... – CarLaTeX Dec 23 '16 at 13:41
• Tkanks CarlaTeX. What is the problem if the source is exported from Geogebra? I simply gave the code provided by Geogebra to be faster and I even wrote in some circumstances; and then repeat with a post is quite right in every respect. – Sebastiano Dec 23 '16 at 15:42
\documentclass[tikz,border=5]{standalone}
\begin{document}
\begin{tikzpicture}[x=1.5cm,y=1.5cm,
pole/.pic={
\tikzset{scale=sin 5}
\clip [preaction={draw, dash pattern=on 2pt off 1pt}] circle [radius=1];
\draw [very thick] (-1,1) -- (1,-1) (-1,-1) -- (1,1);
},
zero/.pic={
\tikzset{scale=sin 5}
\clip [preaction={draw, solid}] circle [radius=1];
}]
\draw [help lines] (-5/4,0) -- (5/4,0) (0,-5/4) -- (0,5/4);
\draw (5:1) arc (5:355:1) -- (0, -sin 5) arc (270:90:sin 5) -- cycle;
\pic at (1/4, 1/2) {pole};
\pic at (1/4, 1/4) {zero};
\pic at (1/4,-1/2) {pole};
\pic at (1/4,-1/4) {zero};
\end{tikzpicture}
\end{document}


\documentclass[border=1pt,tikz]{standalone}
\usepackage{pgfmath}
\begin{document}

\pgfmathsetmacro\rr{cos(6.0)}
\pgfmathsetmacro\rd{sin(6.0)}
\begin{tikzpicture}[scale=2]
\draw (-1.2,0)--(1.2,0) (0,-1.2)--(0,1.2);
\draw (6:1cm) arc (6:354:1cm) -- ++(-\rr,0) arc (270:90:\rd cm) -- cycle;
\end{tikzpicture}

\end{document}