PSTricks 中的椭圆箭头线

PSTricks 中的椭圆箭头线

如何在 PSTricks 中绘制一条带箭头的椭圆线?

在这张以‘地理北极’为中心的图片中可以看到这样的例子:

这个问题与如何使用 TikZ 绘制非全连接的椭圆箭头?但我需要一个解决方案pstricks

我尝试去处理它pscurve但却无法得到对称的结果。

是否可以将这条椭圆线限制在 上psline,您可以在下面的代码中看到吗?

\documentclass[a4paper]{article}
\usepackage{pstricks}

\begin{document}
\begin{pspicture}(-4,-4)(6,6)
\psgrid[subgriddiv=0](0,0)(-11,-11)(11,11)
\psline[origin={0.05,0}](10; 65.25)
\psline[origin={0.05,0}](10;245)
\psline[origin={0.05,0},linestyle=dashed](10; 76.75)
\psline[origin={0.05,0},linestyle=dashed](10;256.75)
\end{pspicture}
\end{document}

答案1

我尝试在软件包的帮助下尽可能忠实地重现您帖子中的图像pst-eucl

\documentclass[a4paper, pdf, x11names]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{pstricks-add, pst-eucl}
\usepackage{graphicx}
\usepackage{siunitx}
\sisetup{detect-family, detect-weight, detect-mode}

\begin{document}

\noindent\centering\sffamily\bfseries\footnotesize
\psset{unit = 6mm}
\begin{pspicture}(-13,-10)(12.5,10)
    \psframe*[linecolor=DodgerBlue4!65!Black](-13,-10)(12.5,10)
    \psclip{\pscircle[linestyle=none](0.09,0.015){2.}}\rput(0,0){\psscaleboxto(4.25,4.0){\includegraphics{simpleglobe.eps}}}\endpsclip
    \psset{ linecolor=Yellow1, PointSymbol=none, PointName=none}
    \psrotate(0,0){-13.25}{\pstGeonode(2; 90){A}(2; -90){B}(0,0){O}(1,0){I}%
        \psline[ linestyle=dashed, linecolor=red](10; -90)(10; 90)
        \rput[tr]{13.25}(10; 90){\begin{tabular}{>{\color{white}}r@{\quad}}North\\Magnetic\\Pole\end{tabular}}
        \rput[bl]{13.25}(10; -90){\begin{tabular}{@{\quad}>{\color{white}}l}South\\Magnetic\\Pole\end{tabular}}
        \rput[tl]{13.25}(10;78.5){\begin{tabular}{>{\color{white}}l}Geographic\\North Pole\end{tabular}}
        \rput[br]{13.25}(10;-101.5){\begin{tabular}{>{\color{white}}l@{\,}}\color{white}Geographic\\South Pole\end{tabular}}
        \psline[linecolor=SeaGreen3](10;78.5)(-10;78.5)
        \psarc(0,0){7}{78.64}{89.86}\rput[bc]{-5.75}(7.3; 83){\color{white}\scriptsize\ang{11,5}}
        \psellipticarc[arrows=->, rot=-5.75](8.5; 78.5)(0.7,0.3){100}{50}
        \psellipticarc[arrows=->, rot=-5.75](-8.5; 78.5)(0.7,0.3){100}{50}
        \pstriangle*[linecolor=white](0,0.08)(0.5,1.6)
        \pstriangle*[linecolor=red](0,-0.08)(0.5,-1.6)
        \multido{\i =1 + 1}{6}{\psset{linewidth=1.2pt}%
            \psscalebox{1 1.10}{%
                \pstGeonode(\i; 180){O\i}\pstGeonode(\i; 0){P\i}
                \pstArcOAB{O\i}{A}{B}\pstArcOAB {P\i}{B}{A}
                \pstInterLC{I}{J}{O\i}{A}{N\i}{M\i}\pstInterLC{I}{J}{P\i}{A}{S\i}{R\i}
                \psdots[dotstyle=triangle*, dotscale=0.8 1](M\i)(R\i)
    }}}
\end{pspicture}

\end{document} 

在此处输入图片描述

图形文件来自本网站,您可以在这里找到很多地球仪。我使用了第 10 页上的“一个简单的地球仪”。

答案2

您可以使用\psellipticarc绘制椭圆弧,例如\psrotatepstricks-add正确旋转椭圆:

\documentclass[a4paper]{article}
\usepackage{pstricks-add}
\SpecialCoor
\begin{document}
\begin{pspicture}(-4,-4)(6,6)
\psgrid[subgriddiv=0](0,0)(-11,-11)(11,11)
\psline[origin={0.05,0}](10; 65.25)
\psline[origin={0.05,0}](10;245)
\psline[origin={0.05,0},linestyle=dashed](10; 76.75)
\psline[origin={0.05,0},linestyle=dashed](10;256.75)
\psrotate(8;65.25){62.25}{%
  \psellipticarc[arrows=->](8;65.25)(0.5,1){20}{340}}
\end{pspicture}
\end{document}

在此处输入图片描述

答案3

根据这两个答案,我用 pst-map3d 构建了带有磁场和赤纬的地球仪。

但我必须注意到,坐标的使用并不像 Bernard 提出的答案那样简洁。

\documentclass[a4paper, pdf, x11names]{standalone}
\usepackage{pst-plot}
\usepackage{pstricks-add}
\usepackage{pst-eucl}
\usepackage{pst-map3d}
\usepackage{siunitx}
\sisetup{detect-family, detect-weight, detect-mode}
\SpecialCoor

\begin{document}
\noindent\centering\sffamily\bfseries\footnotesize
\psset{unit = 6mm}
\begin{pspicture}[](-14,-11)(14,11) %(-4,-4)(6,6)
\rput[bl](-0.2,0){\psscalebox{0.695}{
    \begin{pspicture}(-0.1,0)(0,0.1)
        \WorldMapThreeD[PHI=25,THETA=0,RotX=-23,path=C:/data/pst-geo/data,]
    \end{pspicture}
}}

\psrotate(0,0){-13.25}{
    \psset{linecolor=black, PointSymbol=none, PointName=none}
    \pstGeonode(4.5; 90){A}(4.5; -90){B}(0,0){O}(1,0){I}%

    \multido{\i =1 + 1}{6}{\psset{linewidth=0.75pt}%
        \psscalebox{1 1.10}{%
            \pstGeonode(\i; 180){O\i}\pstGeonode(\i; 0){P\i}
            \pstArcOAB{O\i}{A}{B}\pstArcOAB{P\i}{B}{A}
            \pstInterLC{I}{J}{O\i}{A}{N\i}{M\i}\pstInterLC{I}{J}{P\i}{A}{S\i}{R\i}
            \psdots[dotstyle=triangle*, dotscale=1 1.3](M\i)(R\i)
        }}
}

\psline[origin={0,0}](10; 65.25)
\psline[origin={0,0}](10;245)
\psline[origin={0,0},linestyle=dashed](10; 76.75)
\psline[origin={0,0},linestyle=dashed](10;256.75)

\psrotate(8.6;71.25){62.25}{%
    \psellipticarc[arrows=->](8;65.25)(0.5,1){20}{340}}
\rput(2.3,10){North Magnetic Pole}
\rput(-2.3,-10){North Magnetic Pole}

\psrotate(0,0){62.25}{%
    \psellipticarc[arrows=->](-9;2.5)(0.5,1){20}{340}}
\rput(5,9.3){Geographic North Pole}
\rput(-5,-9.3){Geographic North Pole}

\psrotate(4,10){-20}{%
    \psellipticarc[arrows=<->](3.55,7)(0.8,0.2){0}{180}}
\rput(2.5,7){\ang{11.5}}

%compass
\psrotate(0,0){-13.25}{
    \pstriangle*[linecolor=white](0,0.2)(1,2.5)
    \pstriangle*[linecolor=red](0,-0.2)(1,-2.5)

}

\end{pspicture}
\end{document}

输出(通过 LaTeX 编译器和 DVI->PS->PDF Chain)如下所示:

相关内容