# Draw a semicircle in right half-plan complex

In a nutshell, I just need to use Tikz in order de draw this picture I tried to help myself with some answers but couldn't find a way out.

Thank you very much for your help.

A version with bent arrows on the circular arcs.

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{amsmath}
\DeclareMathOperator{\re}{Re}
\DeclareMathOperator{\im}{Im}
\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] (0,-5) -- (0,5) node[left]{$\im z$};
\draw[-latex] (-1,0) -- (5,0) node[right]{$\re z$};
\draw[red,arc arrow=to pos 0.7 with length 3mm]
(0,-3) node[left,blue]{$-\mathrm{i}R$} arc (-90:90:3)
node[left,blue]{$\mathrm{i}R$};
\draw[red,arc arrow=to pos 0.7 with length 2mm] (0,1.5) arc (90:-90:0.5);
\draw[red,arc arrow=to pos 0.7 with length 2mm] (0,-0.5) arc (90:-90:0.5);
\node[circle,draw,fill,scale=0.3,label=left:{$\mathrm{i}\omega$}] at (0,1){};
\node[circle,draw,fill,scale=0.3,label=left:{$-\mathrm{i}\omega$}] at (0,-1){};
\foreach \X in {2.1,0.2,-2}
{\draw[-{Stealth[length=2mm]},red] (0,\X) --++(0,-0.2);}

\end{tikzpicture}
\end{document} However, I'd find it more convincing if the full contour is red.

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{amsmath}
\DeclareMathOperator{\re}{Re}
\DeclareMathOperator{\im}{Im}
\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] (0,-5) -- (0,5) node[left]{$\im z$};
\draw[-latex] (-1,0) -- (5,0) node[right]{$\re z$};
\node[circle,draw,fill,scale=0.3,label=left:{$\mathrm{i}\omega$}] at (0,1){};
\node[circle,draw,fill,scale=0.3,label=left:{$-\mathrm{i}\omega$}] at (0,-1){};
\begin{scope}[red,thick]
\draw[arc arrow=to pos 0.7 with length 3mm]
(0,-3) node[left,blue]{$-\mathrm{i}R$} arc (-90:90:3)
node[left,blue]{$\mathrm{i}R$};
\draw[arc arrow=to pos 0.7 with length 2mm] (0,{3cm+0.5*\pgflinewidth}) --
(0,{1.5cm-0.5*\pgflinewidth});
\draw[arc arrow=to pos 0.7 with length 2mm] (0,1.5) arc (90:-90:0.5);
\draw[arc arrow=to pos 0.7 with length 2mm] (0,-0.5) arc (90:-90:0.5);
\draw[arc arrow=to pos 0.45 with length 2mm] (0,{0.5cm+0.5*\pgflinewidth}) --
(0,{-0.5cm-0.5*\pgflinewidth});;
\draw[arc arrow=to pos 0.45 with length 2mm] (0,{-1.5cm+0.5*\pgflinewidth}) --
(0,{-3cm-0.5*\pgflinewidth});
\end{scope}
\end{tikzpicture}
\end{document} EDIT: for some reason the output looked bad even though the pdf is fine.

• My sincere thanks for your precious help. please, can you continue coloring the remaining arrows in red. Thank you. – Furdzik May 14 '18 at 15:32
• @Furdzik Done in update. – user121799 May 14 '18 at 15:37
• Again, thank you very much. Please, just one question: How to remove \documentclass[tikz,border=3.14mm]{standalone} to place the text file that defines in its own documentclass? – Furdzik May 14 '18 at 16:24
• @Furdzik You just need to load \usepackage{tikz} in the preamble of your document. – user121799 May 14 '18 at 18:05

Once upon a time I wrote a small library avoidpath that helps to do this :

\documentclass[border=7mm]{standalone}
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{avoidpath} % <--- https://github.com/kpym/tikz-avoidpath

\begin{document}
\begin{tikzpicture}[thick]
% axes and points
\draw
(-1,0) edge[-latex] node[at end,right]{$\operatorname{Re} z$} (4,0)
(0,-4) edge[-latex] node[at end,right]{$\operatorname{Im} z$} (0,4)
(0,1)  node[scale=3](i){.} node[left]{$i$}
(0,-1) node[scale=3](-i){.} node[left]{$-i$}
(0,3)  coordinate(iR) node[blue,left]{$iR$}
(0,-3) coordinate(-iR) node[blue,left]{$-iR$}
;
% the path
\draw[red, with arrows=28mm]
(0,0) 