[pstricks] FYI: Stella maris on nautical chart (Example, minor questions)
TeXnicer
texnicer at web.de
Fri Feb 17 22:24:29 CET 2017
Dear community,
sell, well, well, I just wanted to learn some navigation and *zapp* I am
practicing using a sextant and feel the desire to draw a "stella maris"
historical symbol for polaris-north on nautical charts.
I did this quite rough regarding the combination and amount of multidos
needed, but maybe this contributes to someones work, questions or
triggers more elegant solutions I can learn of. Still I am messing too
much with coordinate systems and rotation.
I took of package "textcomp" but suggest to use \textdegree instead of
$^\circ$.
Aditionally the usage of $\prime$ did not even come close to any
acceptable result.
Looking forward for feedback!
And wavehand to Herbert for this magnificent set of drawing instructions.
Yours,
Carsten (TeXnicer)
\documentclass[]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{multido}
\usepackage{pst-node}
%\usepackage{textcomp} %\textdegree
% definitions
%sample values from Übungskarte D49
\newcommand{\referenceYear}{2010}
\newcommand{\referenceVariation}{.5} % reference year VARiation in
degree! E=+ W=-
\newcommand{\variationLabel}{0$^\circ$\,50'\,E~\referenceYear~(5'\,E)}
% $^\circ$ better: \textdegree from textcomp
\newcommand{\myFont}{\tiny\color{magenta}\sffamily}
% labels for compass rose
\newcounter{degstep}\setcounter{degstep}{0}
\newcommand{\DegreeUpper}{\stepcounter{degstep}\ifcase\value{degstep}%
\or270\or300\or330\or0\or030\or060\or090\fi}%
\newcommand{\DegreeLower}{\stepcounter{degstep}\ifcase\value{degstep}%
\or120\or150\or180\or210\or240\fi}%
\begin{document}\centering\pagestyle{empty}
\section*{Magnetic variation on nautical charts}
\begin{pspicture}(-5,-5)(5,6)%\psframe[linecolor=red](-4.3,-4.3)(4.3,5.3)
\psset{linecolor=magenta,linewidth=.5pt}
% the VAR (OM) cross
\rput{-\referenceVariation}(0,0){%
\psline(-3.55,0)(-.1,0)
\psline(.1,0)(3.5,0)
\psline(0,-3.55)(0,-.1)
\psline(0,.1)(0,3.55)(-.15,3.05)(0,2.85)
\pscircle(0,0){.1}
\psdot[linewidth=.005](0,0)
\rput{90}(0,1.5){\psframebox*[linecolor=white,framesep=2pt]{\myFont\variationLabel}}
} % VAR (OM) cross
\multido{\i=0+2}{180}{% two degree ticks
\rput{\i}(0,0){\psline(0,4)(0,3.87)}
} % two degree ticks
\multido{\iA=0+30,\iAA=270+30}{12}{% thirty degree ticks
\rput{-\iA}(0,0){\psline[linewidth=1pt](0,4)(0,3.7)}
}
\multido{\iAA=270+30}{7}{% labels 270-090
\rput{-\iAA}(0,0){\rput[b](0,4.05){\myFont\DegreeUpper}}
}
\setcounter{degstep}{0}
\multido{\iAB=300+30}{5}{% labels 120-240
\rput{-\iAB}(0,0){\rput[t](0,-4.05){\myFont\DegreeLower}}
}
% Stella Maris line
\psline[linewidth=1pt](0,4.25)(0,4.7)
% Stella Maris
\rput(0,4.87){% star, perimeter/translation
\multido{\iB=90+72,\iC=54+72,\i=0+1}{5}{
\psline(0,0)(.3;\iB)
\pnode(.3;\iB){S\i}
\pnode(.17;\iC){R\i}
\psline(0,0)(.17;\iC)
\multido{\iD=0+72}{5}{% hatching
\rput{\iD}(0,0){% two hatchling lines
\psline(.033,.05)(.033,.24)
\psline(.066,.1)(.066,.19)
}%rput/two hatching lines
}%multido/hatching
}%multido/Stella Maris
}%rput/tranlation
\pspolygon(R0)(S0)(R1)(S1)(R2)(S2)(R3)(S3)(R4)(S4)% the actual star
perimeter
\end{pspicture}\par
\noindent\footnotesize{Creator: C.~Vogel (TeXnicer), 17.\,2.\,2017
License: CC-BY-SA 4.0}\\%
\end{document}
More information about the PSTricks
mailing list