# Elliptic arrow line in PSTricks

How can I draw an elliptic line with arrow around a line in PSTricks?

Example is visible in this picture around the 'Geographic North Pole':

The question is quite similar to How to draw a not fully-connected elliptic arrow using TikZ? but I need a solution for pstricks.

I tried to manage it with pscurve but I was not able to get an symmetric result.

Is it possible to bound this elliptic line on a psline, which you can see in the code below?

\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}


I tried to reproduce as faithfully as possible the image from your post, with the help of the pst-eucl package:

\documentclass[a4paper, pdf, x11names]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\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[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}


The graphics file was obtained from this site, where you can find a lot of globes. I used "A simple globe" on page 10.

• Really nice. Maybe you should post a link to the drawing of the Earth. – Svend Tveskæg Feb 15 '15 at 21:04
• @Svend Tveskæg:Done. I first tried to compile a code from the pst-geo package, but didn't succeed… Note there is small problem for the placement of the first right hand side arrow, which I don't understand. – Bernard Feb 15 '15 at 22:39
• Will take a closer look at the code either later tonight or tomorrow. P.S. The picture on openclipart.org/detail/121483/a-simple-globe-by-jhnri4 doesn't look like the same as the one you've used. – Svend Tveskæg Feb 15 '15 at 22:48
• Not at all. It was the object of the small discussion with @Svend Tveskæg. Normally, it should be in line. I'll submit the case to Herbert Voss. – Bernard Feb 16 '15 at 22:21
• @Svend Tveskæg: He answered at the beginning of this week. Unfortunately, he won't have time before summer. Perhaps I should write to the original author of the pst-eucl, Dominique Rodriguez. – Bernard Mar 8 '15 at 18:07

You can use \psellipticarc to draw the elliptic arc, and e.g. \psrotate from pstricks-add to rotate the ellipse correctly:

\documentclass[a4paper]{article}
\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}


Based on the two answers I constructed the globe with the magnetic field and the declination with pst-map3d.

But I have to notice that the usage of coordinates is not neat like in the proposed answer of Bernard.

\documentclass[a4paper, pdf, x11names]{standalone}
\usepackage{pst-plot}
\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}


The output (via LaTeX compiler and DVI->PS->PDF Chain) looks like this: