与 tikz 的集成路径

与 tikz 的集成路径

我需要为我的期末论文画一条路径。不幸的是,这并不常见,我在以前的题目中找不到它,但我对 Tikz 不够熟悉,无法自己画它或修改其中一个类似的路径。

在此处输入图片描述

有人能帮我吗?文字和虚线不是必需的。提前谢谢!

答案1

这可能是一个有用的起点

我要回家了,没有留下任何评论。

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}

  \draw[->] (-1.5,0) -- ++ (3,0);
  \draw[->] (0,-1.5) -- ++ (0,3);

  \def\StartAng{5}
  \def\DeltaAng{30}
  \coordinate (a) at (\StartAng:1);
  \coordinate (a') at (180-\StartAng-\DeltaAng:1);

  \draw (a) arc [start angle=\StartAng,delta angle=\DeltaAng, radius=1]
  -- (a')
  arc [start angle={180-\StartAng-\DeltaAng}, delta angle=\DeltaAng, radius=1]
  -- cycle;
  ;

  \def\StartAng{50}
  \coordinate (a) at (\StartAng:1);

  \draw (a) arc [start angle=\StartAng,
  end angle = {180-\StartAng}, radius=1]
  -- cycle
  ;

  \def\StartAng{-5}
  \coordinate (a) at (\StartAng:1);

  \draw (a) arc [start angle={\StartAng},
  end angle = {-180-\StartAng}, radius=1]
  -- cycle
  ;


\end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

有点类似daleif 的回答但箭是弯的。

\documentclass[tikz,border=3mm]{standalone}
\usepackage{amsmath}
\DeclareMathOperator{\im}{Im}
\DeclareMathOperator{\re}{Re}
\usetikzlibrary{arrows.meta,bending,decorations.markings}
\tikzset{% https://tex.stackexchange.com/a/430239
    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}[thick]
 \draw[-stealth] (0,-2.5) -- (0,2.5);
 \draw[-stealth] (-2.2,0) -- (2.2,0) node[right]{$\im\varepsilon=0$};
 \draw[arc arrow=to pos 0.4 with length 3mm] (50:2) coordinate(aux1) arc(50:130:2) -- cycle;
 \draw[arc arrow=to pos 0.55 with length 3mm] (5:2) arc(5:40:2) coordinate(aux2) -- 
 (140:2) arc(140:175:2) -- cycle;
 \draw[arc arrow=to pos 0.25 with length 3mm] (185:2) arc(185:355:2) --  cycle; 
 \path (aux1) -- (aux2) coordinate[midway] (aux) (aux-|0,0) coordinate(aux0);
 \draw[dashed] (-2,0|-aux) -- (2,0|-aux)
  node[right]{$\im(\varepsilon-\mathrm{i}\omega)=0$};
 \draw plot[only marks,mark=x,mark options={thin,red}] 
  coordinates {(aux0) (0,0)};
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案3

如同@薛定谔的猫答案,但代码有一点不同:

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{decorations.markings}

\begin{document}
    \begin{tikzpicture}[
line/.style = {decoration={markings, 
                           mark=at position #1 with 
                            {\arrow[very thick]{>}}},
               postaction={decorate}}
                        ]
\draw[->]   (-3,0) -- (3,0) node[right] {$\mathrm{Im}\,\epsilon = 0$};
\draw[->]   (0,-3) -- (0,3);
\fill[red]  (0,0) circle[radius=2pt];
%
\draw[line=0.45]
    ( 30:2.4) arc (30:150:2.4) -- cycle;
\draw[line=0.04]
    (155:2.4) arc (155:175:2.4) -- (5:2.4) arc ( 5:25:2.4) -- cycle;
\draw[line=0.18]
    (185:2.4) arc (185:355:2.4) -- cycle;
\coordinate (aux) at (152.25:2.4);
\draw[dashed] (-3,0 |- aux) -- ++ (6,0) 
                            node[right] {$\mathrm{Im}(\epsilon-\mathrm{i}\omega) = 0$};
\fill[red]  (aux -| 0,0) circle[radius=2pt];
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容