Retour

postel2.tex

Télécharger le fichier Fichier PDF
Image PNG
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
%\usepackage{movie15}
%\usepackage[colorlinks=true]{hyperref}
\usepackage[frenchb]{babel}
\usepackage{pst-blur}
\usepackage{pstricks,pst-plot,pst-node}
\usepackage[a4paper,vmargin=2cm]{geometry}
%
\SpecialCoor
\makeatletter
% la cartographie
\pst@addfams{pst-WorldMapPostel}
\define@key[psset]{pst-WorldMapPostel}{hemisphere}{\edef\psk@WorldMapPostel{#1}}
\psset[pst-WorldMapPostel]{hemisphere=north}
% second possibility: hemisphere=south
\def\WorldMapPostel{\pst@object{WorldMapPostel}}
\def\WorldMapPostel@i{\@ifnextchar[{\WorldMapPostel@do}{\WorldMapPostel@do[]}}
\def\WorldMapPostel@do[#1]{{%
\psset{#1}%
\begin@ClosedObj
\addto@pscode{%
% Postel
% rho=pi/2 delta sub def
% Y=-rho*cos(alpha)
% X=-rho*sin(alpha)
1 setlinejoin
0 0 translate
/xunit {\pst@number\psxunit\space mul 20 div }def
/yunit {\pst@number\psyunit\space mul 20 div }def
/hemisphere (\psk@WorldMapPostel) def
/RADIUS {4.5 \pst@number\psxunit\space mul} bind def
hemisphere (north) eq hemisphere (south) eq or {}{/hemisphere (north) def} ifelse
hemisphere (north) eq {
    /Coeff {90 sub} def
    /signeX {neg} def
    /signeY {} def
    (world21.dat) run
    } if
hemisphere (south) eq {
    /Coeff {90 add} def
    /signeX {} def
    /signeY {neg} def
    (world2.dat) run
    } if
%
/Draw {
coasts {
/region exch def
/nbr region length def % nombre de régions
newpath
region nbr 1 sub get aload pop
  /delta exch def /alpha exch def
  /Y delta Coeff alpha cos mul def
  /X delta Coeff alpha sin mul def
  X xunit signeX Y yunit signeY moveto
0 1 nbr 1 sub {
  region exch get aload pop
  /delta exch def /alpha exch def
  /Y delta Coeff alpha cos mul def
  /X delta Coeff alpha sin mul def
  X xunit signeX Y yunit signeY lineto
} for
closepath
gsave
0.6875 0.8 0.5625 setrgbcolor
fill
grestore
stroke
} forall
} def
gsave
0 0 RADIUS 0 360 arc
clip
    Draw
grestore
}%
\multido{\iL=0+30}{12}{%
    \psline[linewidth=0.02](4.5;\iL)}%
\multido{\il=0+15}{6}{%
    \pscircle[linewidth=0.02]{!\il\space 20 div}}%
\multido{\iL=30+30,\iP=-60+30}{5}{%
    \uput{0.1}[\iP](4.5;\iP){\tiny\iL E}}%
\multido{\iL=30+30,\iP=-120+-30}{5}{%
    \uput{0.1}[\iP](4.5;\iP){\tiny\iL W}}%
\uput{0.1}[u](4.5;90){\tiny 180}
\uput{0.1}[d](4.5;-90){\tiny 0}
\end@ClosedObj
}}
\makeatother
%
\makeatletter
% illustrer la projection de Guillaume Postel
% on donne :
% le rayon de la sphère : R en cm
% l'angle alpha en degrés qui détermine la position au cours du rabattement
% l'angle lat en degrés qui détermine la latitude sur l'hémisphère
\pst@addfams{pst-postel}
 
\define@key[psset]{pst-postel}{R}{\def\pst@postel@R{#1}}%
\define@key[psset]{pst-postel}{lat}{\def\pst@postel@lat{#1}}%
\define@key[psset]{pst-postel}{alpha}{\def\pst@postel@alpha{#1}}%
 
\psset[pst-postel]{R=3,lat=30,alpha=90}% valeurs par defaut
 
\def\calcPS{
% angle A1OT
         /beta alpha lat sub deg2rad ATAN1 def
% point de tangence
         /xT alpha cos R mul def
         /yT alpha sin R mul def
% longueur de l'arc NA
         /NA R PiDiv2 lat deg2rad sub mul def
% longueur de l'arc de N à T
         /NT R PiDiv2 alpha deg2rad sub mul def
% longueur de la tangente
         /TA1 R lat alpha sub deg2rad mul def
% distance de OA1
         /OA1 R dup mul TA1 dup mul add sqrt def
% angle polaire de A1
         /gamma alpha beta sub def
% coordonnées de A1
         /xA1 OA1 gamma cos mul def
         /yA1 OA1 gamma sin mul def }%
%
\def\psPostel{\pst@object{psPostel}}
\def\psPostel@i{%
  \pst@killglue%
  \begingroup%
  \use@par%
\SpecialCoor
\pstVerb{
   /R \pst@postel@R\space def
   /lat \pst@postel@lat\space def
   /alpha0 \pst@postel@alpha\space def
%%% partie de pstricks.pro ---
    /PiDiv2 1.57079632680 def
    /Pi 3.14159265359 def
    /ATAN1 {neg -1 atan 180 sub } def
    /deg2rad {Pi mul 180 div} def
%%% --------------------- %%%
    /xA lat cos R mul def
    /yA lat sin R mul def
    /xA' R 90 lat sub deg2rad mul def
    /yA' R def}
\parametricplot[linewidth=0.025,linecolor=gray]{lat}{90}{%
         /alpha t def
        \calcPS
         xA1 yA1}
%% symétriquement
\parametricplot[linewidth=0.025,linecolor=gray]{lat}{90}{%
         /alpha t def
        \calcPS
         xA1 neg yA1}
\parametricplot[linewidth=0.05,linecolor=blue,arrows=->]{lat}{alpha0}{%
         /alpha t def
        \calcPS
         xA1 yA1}
\parametricplot[linewidth=0.05,linecolor=blue,arrows=->]{lat}{alpha0}{%
         /alpha t def
        \calcPS
         xA1 neg yA1}
\psline{->}(!R 1.5 mul neg 0)(!R 1.5 mul 0)
\psline{->}(!0 R 1.5 mul neg)(!0 R 1.5 mul)
\psline(!R 1.5 mul neg R)(!R 1.5 mul R)
\pscircle{!R}
\pstVerb{/alpha alpha0 def \calcPS}%
\psarc[linecolor=red](0,0){!R}{!lat}{90}
\psarc[linecolor=red,linewidth=0.05](0,0){!R}{!alpha}{90}
\psline[linecolor=red,linewidth=0.05](!xA1 yA1)(!xT yT)
\psarc[linecolor=red,linewidth=0.05](0,0){!R}{90}{!180 alpha sub}
\psline[linecolor=red,linewidth=0.05](!xA1 neg yA1)(!xT neg yT)
\psline[linecolor=gray](!xA yA)
\psdot[linecolor=red](!xA yA)
\uput[r](!xA yA){$A$}
\psline[linecolor=red](! 0 R)(!xA' yA')
\psdot[linecolor=red](!xA' yA')
\uput[u](!xA' yA'){$A'$}
\psarc[linecolor=gray]{->}(0,0){1}{0}{!lat}
\uput[!lat 2 div](!1 lat 2 div cos mul 1 lat 2 div sin mul){\gray $l$}
\psline(0,0)(!xT yT)
\psdot[linecolor=red](!xT yT)
\uput{0.1}[!alpha](!xT yT){$T$}
\psarc{->}(0,0){1.5}{0}{!alpha}
\uput[!alpha 2 div](!1.5 alpha 2 div cos mul 1.5 alpha 2 div sin mul){$\alpha$}
\uput[ur](!0 R){N}
\uput[dr](!0 R neg){S}
\uput[dl](0,0){O}
\uput[u](!R neg R){$\mathcal{(P)}$}
\uput[u](!xA' 2 div yA'){$\overline{NA'}=\ARC{NA}$}
   \endgroup%
   \ignorespaces%
}
\makeatother
%
\makeatletter
% macro d'Etienne RIGA sur fr.comp.text.tex
\newcount\r@pport  \newdimen\r@ppord
\newcount\kslant   \newdimen\kslantd
 
\def\ARC#1{\setbox0\hbox{$\m@th\displaystyle#1$}\kslant=\ht0
   \divide\kslant by1000\multiply\kslant by\fontdimen1\textfont1
   \divide\kslant by10000\kslantd=\kslant\fontdimen6\textfont1
      \divide\kslantd by7750\kern\kslantd
   \r@ppord=\wd0\multiply\r@ppord by100\divide\r@ppord by\ht0
   \multiply\r@ppord by300\advance\r@ppord by\ht0
   \pspicture(0,0)
   \parabola[linewidth=.3pt](0,1.05\ht0)(.5\wd0,1.21\r@ppord)
   \endpspicture\kern-\kslantd\box0}
\makeatother
\newcommand\encadre[1]{\begin{center}
\psframebox[linestyle=none,fillcolor={[rgb]{0.925 1 0.755}},fillstyle=solid,blur=true,shadow=true,framesep=0pt]{
  \begin{minipage}{0.7\linewidth}
  {#1}
  \end{minipage}}
  \end{center}}
 
\title{Projection de Guillaume Postel}
\author{ML}
\date{3 novembre 2\,011}
 
\pagestyle{empty}
 
\begin{document}
\begin{center}
\psset{xunit=0.75,yunit=0.75,runit=0.75}
\psframebox{
\begin{pspicture}(-5,-5)(5,5)
\pscircle[fillstyle=solid,fillcolor={[rgb]{0.675 0.935 1}},linecolor=blue]{4.5}
\WorldMapPostel
\end{pspicture}
\begin{pspicture}(-5,-5)(5,5)
\pscircle[fillstyle=solid,fillcolor={[rgb]{0.675 0.935 1}},linecolor=blue]{4.5}
\WorldMapPostel[hemisphere=south]
\end{pspicture}}
\end{center}
\end{document}