评论

评论

我想首先在 xy 平面上绘制一个阴影区域:

0≤x

0≤y≤π

然后把上述区域的图像通过变换映射到 uv 平面上f=exp(z),即阴影区域:

exp(0)≤ρ

0≤θ≤π

但是,我甚至不知道从哪里开始,因为我对 LaTeX 绘图还不熟悉。任何涉及 TikZ、pgfplots甚至 GNUplot 等工具的想法都欢迎。

有关该问题的更多信息:

基本上我想要的是像这样的图表 在此处输入图片描述

除了在我的情况下,左图中 A 将是 (0,0),D 将是 (0,π),并且 B、C 将在无穷远处(因此,两条射线);对于右图,A' 将是 (e,0),D' 将是 (-e,0),并且 A' D' 由半圆连接。

答案1

评论

带有箭头的路径需要额外的注意,但在这个很棒的网站上,我找到了一种方法来做到这一点:-)。有关更多信息,请参阅此帖子:TikZ:如何在线中间画箭头?


你帖子里的图片

我使用 TikZ 重新创建了您帖子中的图片。

执行

\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.markings}
\tikzset{
    arrow inside/.style = {
        postaction = {
            decorate,
            decoration={
                markings,
                mark=at position 0.5 with {\arrow{>}}
            }
        }
    }
}
\begin{document}
\begin{tikzpicture}[>=latex,scale=1.5]
    \begin{scope}
        % Axes
        \draw (0,0) node[below left] {$O$}
            (-0.5,0) -- (4,0) node[below] {$x$}
            (0,-0.5) -- (0,3) node[left] {$y$};
        % Ticks
        \draw (1,0) -- (1,-0.1) node[below] {$a$}
            (3,0) -- (3,-0.1) node[below] {$b$}
            (0,1) -- (-0.1,1) node[left] {$c$}
            (0,2) -- (-0.1,2) node[left] {$d$};
        % Square
        \draw[thick] (1,1) node[below left] {$A$} --
            (3,1) node[below right] {$B$} --
            (3,2) node[above right] {$C$} --
            (1,2) node[above left] {$D$} -- cycle;
        \draw[arrow inside] (1.5,1) -- (1.5,2);
    \end{scope}

    \begin{scope}[xshift=6cm]
        % Axes
        \draw (0,0) node[below left] {$O$}
            (-0.5,0) -- (4,0) node[below] {$u$}
            (0,-0.5) -- (0,3) node[left] {$v$};
        %Help Lines
        \draw (0,0) -- (30:3) (0,0) -- (70:3);
        % Angles 
        \draw[->] (0.6,0) arc[start angle=0, end angle=70, radius=0.6] node[above right] {\small $\phi = d$};
        \draw[->] (0.8,0) node[above right] {\small$\phi = c$} arc[start angle=0, end angle=30, radius=0.8];
        % Transformation
        \draw[thick] (30:1.5) node[right] {$A'$} --
            (30:3) node[below right] {$B'$} arc[start angle=30, end angle=70, radius=3]
            (70:3) node[above right] {$C'$} --
            (70:1.5) node[above left] {$D'$} arc[start angle=70, end angle=30, radius=1.5];
            \draw[arrow inside] (30:1.9) arc[start angle=30, end angle=70, radius=1.9];
    \end{scope}
\end{tikzpicture}
\end{document}

输出

我希望您满意。

转换


从你的描述来看

我不知道你的描述是否正确,但根据你的描述,我做了以下事情

执行

\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.markings}
\tikzset{
    arrow inside/.style = {
        postaction = {
            decorate,
            decoration={
                markings,
                mark=at position #1 with {\arrow{>}}
            }
        }
    },
    arrow inside/.default = 0.5
}
\begin{document}
\begin{tikzpicture}[>=latex]
    \begin{scope}
        % Axes
        \draw (0,0) node[below left] {$O$}
            (-0.5,0) -- (5,0) node[below] {$x$}
            (0,-0.5) -- (0,4) node[left] {$y$};
        % Ticks
        \draw (0,pi) -- (-0.1,pi) node[left] {$\pi$};
        % Square
        \draw[thick] (4.5,0) --
            (0,0) node[above left] {$A$} --
            (0,pi) node[above right] {$D$} --
            (4.5,pi);
        \draw[arrow inside] (1.5,0) -- (1.5,pi);
    \end{scope}

    \begin{scope}[xshift=10cm]
        % Axes
        \draw (0,0) node[below left] {$O$}
            (-4,0) -- (4,0) node[below] {$u$}
            (0,-0.5) -- (0,3.5) node[left] {$v$};
        % Ticks
        \draw (e,0) -- (e,-0.1) node[below] {$\mathrm{e}$}
            (-e,0) -- (-e,-0.1) node[below] {$-\mathrm{e}$};
        % Transformation
        \draw[thick] (3.8,0) --
            (e,0) node[above left] {$A'$}
            arc[start angle=0, end angle=180, radius=e]
            (-e,0) node[above right] {$D'$} --
            (-3.8,0);
        \draw[arrow inside=0.4] (3.2,0) arc[start angle=0, end angle=180, radius=3.2];
    \end{scope}
\end{tikzpicture}
\end{document}

输出

你的一个

答案2

与 PSTricks 一起:只是为了好玩!

图1:

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pstricks-add,pst-eucl}
\begin{document}
% canvas
\begin{pspicture}(-1,-1)(5,4)
    % axes without ticks and tick labels
    \psaxes[ticks=none,labels=none](0,0)(-1,-1)(5,4)[$x$,-90][$y$,180]
    % rectangle with labels
    \pstGeonode[PointSymbol=none,PosAngle={-135,-45,45,135},CurveType=polygon]
        (1,1){A}(4,1){B}(4,3){C}(1,3){D}
    % a line with arrow head at the middle part
    \psline[ArrowInside=->](2,1)(2,3)
    % ticks in x axis
    \psset{ticksize=0pt -3pt}
    \psxTick(1){a}
    \psxTick(4){b}
    % ticks in y axis
    \psset{ticksize=0pt -3pt}
    \psyTick(1){c}
    \psyTick(3){d}
    % origin label
    \uput[-135](0,0){$O$}
\end{pspicture}
\end{document}

在此处输入图片描述

图 2:

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pstricks-add,pst-eucl}
\everypsbox{\scriptsize}
\begin{document}
% canvas
\begin{pspicture}(-1,-1)(4,4)
    % axes without ticks and tick labels
    \psaxes[ticks=none,labels=none](0,0)(-1,-1)(4,4)[$u$,-90][$v$,180]
    % rectangle with labels
    \pstGeonode[PointSymbol=none,PosAngle={-45,-45,135,135}]
        (2;30){A'}(4;30){B'}(4;60){C'}(2;60){D'}
    \pscustom
    {
        \psline(A')(B')
        \psarc(0,0){4}{(B')}{(C')}
        \psline(C')(D')
        \psarcn(0,0){2}{(D')}{(A')}
        \closepath
    }
    % arc with middle arrow head
    \psarc(0,0){2.5}{(A')}{(D')}
    \psarc{->}(0,0){2.5}{(A')}{46.5}% trial and error approach!
    % line D'OA'
    \psline[linejoin=2](D')(0,0)(A')
    % arc and angle label
    \psset{arcsep=\pslinewidth,arrows=->,arrowscale=.75}
    \psarc(0,0){.5}{0}{(D')}
    \psarc(0,0){.75}{0}{(A')}
    \uput{.9}[15](0,0){$\phi=c$}
    \uput{.8}[51](0,0){$\phi=d$}
    % origin label
    \uput[-135](0,0){$O$}
\end{pspicture}
\end{document}

在此处输入图片描述

相关内容