TransWikia.com

Contour integral plot

TeX - LaTeX Asked on April 24, 2021

As of now I have the code below (thanks to @AndréC), but I was hoping to also include an additional semi-circle, seen in the hand-drawn image. I am sorry, I am not so good with tikz, yet. Thank you!
Here is the code:

documentclass[border=5mm]{standalone}
usepackage{tikz}
usetikzlibrary{calc,decorations.markings,positioning}
begin{document}
        begin{tikzpicture}
        %configurable parameters
        defgap{0.4}
        defbigradius{4}
        deflittleradius{1}
        %axes
        draw[line width=2pt,->](-1.5*bigradius,0) -- (1.5*bigradius,0)
        (0,-1.5*bigradius) -- (0,1.5*bigradius);
        draw[line width=2pt,->] (0,0)--(45:littleradius);
        draw[line width=2pt,->](0,0) -- (135:bigradius); node[above
        right] at (45:littleradius/1.5) {largebf{$varepsilon$}};
        draw[line width=1pt,decoration={markings,
            mark=at position 0.07 with{arrow[line width =2pt]{>}},%{latex}},
            mark=at position 0.17 with{arrow[line width =2pt]{>}},
            mark=at position 0.27 with{arrow[line width =2pt]{>}},
            mark=at position 0.35 with {arrow[line width =2pt]{>}},%{latex}},
            mark=at position 0.47 with{arrow[line width =2pt]{>}},
            mark=at position 0.53 with{arrow[line width =2pt]{>}},%{latex}},
            mark=at position 0.6 with {arrow[line width =2pt]{>}},%{latex}},
            mark=at position 0.65 with {arrow[line width =2pt]{>}},%{latex}},
            mark=at position 0.7 with{arrow[line width =2pt]{>}},
            mark=at position 0.8 with{arrow[line width =2pt]{>}},
            mark=at position 0.85 with{arrow[line width =2pt]{>}},
            mark=at position 0.955 with{arrow[line width =2pt]{>}}},%{latex}}},
        postaction={decorate}]
        let
        n1={asin(gap/2/bigradius)},
        n2={asin(gap/2/littleradius)}
        in (180-n1:bigradius) -- (-180-n2:littleradius)
        arc(180-n2:-180+n2:littleradius)--(-180+n1:bigradius)
        arc(-180+n1:-45:bigradius)--(45:bigradius)arc(45:(180-n1):bigradius);
        coordinate (T) at (135:2);
         node[above] at (T){$T$}; 
        coordinate (H) at (1.5*bigradius,0);
         node[below] at (H){Largebf {x}};
        coordinate (J) at (0,1.5*bigradius);
         node[left] at (J){$Largebf y$}; 
        coordinate (C) at (littleradius,0);
         node[below right] at (C) {Largebf {C}};
        coordinate (D) at ({180-asin(gap/2/littleradius)}:1);            node[above left] at (D) {$ Largebf B$}; 
        coordinate (E) at ({-180+asin(gap/2/littleradius)}:1);           node[below left] at (E) {$Largebf D$}; 
        coordinate (F) at ({180-asin(gap/2/bigradius)}:bigradius); 
        node[above left] at (F) {$Largebf A$}; 
        coordinate (G) at ({-180+asin(gap/2/bigradius)}:bigradius); 
        node[below left] at (G) {$Largebf  E$}; 
        coordinate (P) at (0,-4);
        
         node[below right] at (P) {$Largebf F$};
         coordinate(Q) at (3,-4);
        node[right] at (Q) {$Largebf G(gamma-iT)$}; 
        coordinate (R) at (3,4); 
        node[right] at (R) {$Largebf H(gamma+iT)$}; 
        coordinate (S) at (0,4);
        node[above right] at (S) {$Largebf K$};
        end{tikzpicture}
end{document}

and was hoping for the additional semi circle is seen to the left of the smaller-circle in the center:

enter image description here

EDIT: I managed to add the following, which fits for my slightly edited graph:

        draw[thick, line width=   0.63pt] (-.9,.25) +(180:.3) arc (0:180:.3);
        draw[thick, line width=   0.63pt] (-.9,-.25) +(-180:.3) arc (0:-180:.3);

How do I get rid of the lines below the small circles, though? I want a semi-circle that does not have any bottom to it, like the one in the hand-drawn picture. Is there any way to do that with this code?

One Answer

screenshot

documentclass[border=5mm]{standalone}
usepackage{tikz}
usetikzlibrary{calc,decorations.markings,positioning}
begin{document}
        begin{tikzpicture}
        %configurable parameters
        defgap{0.4}
        defbigradius{4}
        deflittleradius{1}
        deftinyradius{.5}%<-- new radius for the new semi-circle
        %axes
        draw[line width=2pt,->](-1.5*bigradius,0) -- (1.5*bigradius,0)
        (0,-1.5*bigradius) -- (0,1.5*bigradius);
        draw[line width=2pt,->] (0,0)--(45:littleradius);
        draw[line width=2pt,->](0,0) -- (135:bigradius); node[above
        right] at (45:littleradius/1.5) {largebf{$varepsilon$}};
        draw[line width=1pt,decoration={markings,
            mark=at position 0.065 with{arrow[line width =2pt]{>}},%{latex}},
            mark=at position 0.17 with{arrow[line width =2pt]{>}},
            mark=at position 0.29 with{arrow[line width =2pt]{>}},
            mark=at position 0.35 with {arrow[line width =2pt]{>}},%{latex}},
            mark=at position 0.47 with{arrow[line width =2pt]{>}},
            mark=at position 0.53 with{arrow[line width =2pt]{>}},%{latex}},
            mark=at position 0.6 with {arrow[line width =2pt]{>}},%{latex}},
            mark=at position 0.65 with {arrow[line width =2pt]{>}},%{latex}},
            mark=at position 0.7 with{arrow[line width =2pt]{>}},
            mark=at position 0.8 with{arrow[line width =2pt]{>}},
            mark=at position 0.85 with{arrow[line width =2pt]{>}},
            mark=at position 0.955 with{arrow[line width =2pt]{>}}},%{latex}}},
        postaction={decorate}]
        let
        n1={asin(gap/2/bigradius)},
        n2={asin(gap/2/littleradius)}
        in (180-n1:bigradius) --($(180-n1:bigradius)!.5! (-180-n2:littleradius)$)arc(180:0:tinyradius)-- (-180-n2:littleradius)
        arc(180-n2:-180+n2:littleradius)--($(-180+n2:littleradius)!.5!(-180+n1:bigradius)!2*tinyradius cm!(-180+n2:littleradius)$)arc(0:-180:tinyradius)--(-180+n1:bigradius)
        arc(-180+n1:-45:bigradius)--(45:bigradius)arc(45:(180-n1):bigradius);
        coordinate (T) at (135:2);
         node[above] at (T){$T$}; 
        coordinate (H) at (1.5*bigradius,0);
         node[below] at (H){Largebf {x}};
        coordinate (J) at (0,1.5*bigradius);
         node[left] at (J){$Largebf y$}; 
        coordinate (C) at (littleradius,0);
         node[below right] at (C) {Largebf {C}};
        coordinate (D) at ({180-asin(gap/2/littleradius)}:1);            node[above left] at (D) {$ Largebf B$}; 
        coordinate (E) at ({-180+asin(gap/2/littleradius)}:1);           node[below left] at (E) {$Largebf D$}; 
        coordinate (F) at ({180-asin(gap/2/bigradius)}:bigradius); 
        node[above left] at (F) {$Largebf A$}; 
        coordinate (G) at ({-180+asin(gap/2/bigradius)}:bigradius); 
        node[below left] at (G) {$Largebf  E$}; 
        coordinate (P) at (0,-4);
        
         node[below right] at (P) {$Largebf F$};
         coordinate(Q) at (3,-4);
        node[right] at (Q) {$Largebf G(gamma-iT)$}; 
        coordinate (R) at (3,4); 
        node[right] at (R) {$Largebf H(gamma+iT)$}; 
        coordinate (S) at (0,4);
        node[above right] at (S) {$Largebf K$};
        end{tikzpicture}
end{document}

Correct answer by AndréC on April 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP