Changeset 44

Show
Ignore:
Timestamp:
03/18/08 21:28:57 (10 months ago)
Author:
christophe
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/mp-geo/doc/doc-mp-geo.tex

    r43 r44  
    44\usepackage[frenchb]{babel} 
    55\usepackage[pdftex,a4paper,margin=1.5cm,nohead]{geometry} 
    6 %\usepackage[draft]{graphicx} 
    76\usepackage{graphicx} 
    87\graphicspath{{figuresdoc/}} 
     
    1110 
    1211\usepackage{calc,url,subfigure,amsmath} 
    13 \usepackage{mflogo,manfnt,pifont,textcomp} 
     12\usepackage{fourier,mflogo,manfnt,pifont,textcomp} 
    1413\input{christ5} 
    15 \usepackage[charter]{mathdesign} 
    16  
    17  
    1814\pagestyle{empty} 
    1915 
     
    4642\definecolor{LightRed}{rgb}{1,0.8,0.8} 
    4743 
    48 \title{\texttt{mp-geographie}} 
     44\title{\texttt{mp-geo}} 
    4945\author{C.Poulain} 
    5046\date{\today} 
     
    5248\maketitle 
    5349\begin{abstract} 
    54 \texttt{mp-geographie} est un paquet \MP\ permettant de représenter la 
     50\texttt{mp-geo} est un paquet \MP\ permettant de représenter la 
    5551Terre. Il est possible de la voir sous n'importe quel angle. La 
    5652majorité des éléments présents réellement sont présents sur les 
     
    6056\begin{figure}[ht] 
    6157  \centering 
    62   \includegraphics[scale=0.7]{pagepresentation-1.png} 
     58  \includegraphics[scale=0.8]{pagepresentation.png} 
    6359  \caption{Vue de l'Asie ($\theta=90$\degres; $\phi=20$\degres).} 
    6460  \label{Asie} 
    6561\end{figure} 
    66 \newpage 
    6762\tableofcontents 
    6863\newpage 
     
    8984    On doit être à l'aise avec cette valeur. ;-) 
    9085} 
    91 En effet, \texttt{mp-geographie} est un package gourmand en 
     86En effet, \texttt{mp-geo} est un package gourmand en 
    9287ressources. \`A titre d'exemple, la création de l'image \ref{Asie} a duré environ 26 secondes\footnote{Les réponses données 
    9388  par la commande \texttt{time} sous Linux sont\\ 
     
    9994\section{Introduction} 
    10095Ce package est encore {\em en développement}. Par comparaison avec le 
    101 package PStricks \verb!pst-geo!, \verb!mp-geographie! comporte, dans l'état 
     96package PStricks \verb!pst-geo!, \verb!mp-geo! comporte, dans l'état 
    10297actuel, beaucoup moins de points de tracés\footnote{Les données 
    10398  proviennent de la page \url{ftp://ftp.blm.gov/pub/gis/wdbprg.zip} 
     
    116111parlant de ce package, je tiens à remercier Manuel {\sc Luque} pour l'aide 
    117112et les encouragements qu'il a pu m'apporter durant l'élaboration de 
    118 \texttt{mp-geographie}. 
    119 \begin{figure}[ht] 
    120   \centering 
    121   \includegraphics[scale=0.5]{grandslacs-1.png} 
     113\texttt{mp-geo}. 
     114\begin{figure}[ht] 
     115  \centering 
     116  \includegraphics[scale=0.7]{grandslacs.png} 
    122117  \caption{Les grands lacs d'Amérique du Nord ($\theta=-105$\degres; 
    123118    $\phi=45$\degres)} 
     
    157152  \centering 
    158153  \subfigure[Figure 
    159   \ding{172}]{\includegraphics[scale=0.5]{payscomplets-1.png}}\hfill\subfigure[Figure \ding{173}]{\includegraphics[scale=0.5]{paysnus-1.png}} 
     154  \ding{172}]{\includegraphics[scale=0.7]{payscomplets.png}}\hfill\subfigure[Figure \ding{173}]{\includegraphics[scale=0.7]{paysnus.png}} 
    160155\end{figure} 
    161156Une autre option est celle de colorer uniformément ou pas les 
     
    166161\begin{figure}[ht] 
    167162  \centering 
    168   \includegraphics[scale=0.5]{mondenoncolore-1.png} 
     163  \includegraphics[scale=0.7]{mondenoncolore.png} 
    169164  \caption{Coloration uniforme ($\theta=105$\degres; $\phi=30$\degres).} 
    170165  \label{unicolore} 
     
    176171\begin{figure}[ht] 
    177172  \centering 
    178   \includegraphics[scale=0.5]{oceaniemeridien-1.png} 
     173  \includegraphics[scale=0.7]{oceaniemeridien.png} 
    179174  \caption{Méridiens et parallèles ($\theta=120$\degres; $\phi=-20$\degres).} 
    180175  \label{meridien} 
     
    273268\begin{figure}[ht] 
    274269  \centering 
    275   \includegraphics[scale=0.5]{polesud-1.png
     270  \includegraphics[scale=0.7]{polesud
    276271  \caption{L'immensité du pôle sud ($\theta=0$; $\phi=90$\degres).} 
    277272\end{figure} 
     
    282277\begin{figure}[ht] 
    283278  \centering 
    284   \includegraphics[scale=0.5]{mp-geotrans-1.png} 
     279  \includegraphics{globetransparent.png} 
    285280  \caption{Un peu de transparence.} 
    286281\end{figure} 
     
    344339\begin{figure}[h] 
    345340  \centering 
    346   \includegraphics[scale=0.5]{mercator-1.png} 
     341  \includegraphics{Mercator.png} 
    347342  \caption{Carte de France selon une projection Mercator.} 
    348343\end{figure} 
     
    381376\begin{figure}[ht] 
    382377  \centering 
    383   \includegraphics[scale=0.5]{cylindrique-1.png} 
     378  \includegraphics{Cylindrique.png} 
    384379  \caption{Carte de France selon la projection cylindrique.} 
    385380\end{figure} 
     
    410405\begin{figure}[ht] 
    411406  \centering 
    412   \includegraphics[scale=0.5]{coniqueHN-1.png} 
     407  \includegraphics{coniqueHN.png} 
    413408  \caption{Projection conique - Hémisphère nord.} 
    414409\end{figure} 
     
    426421\begin{figure}[ht] 
    427422  \centering 
    428   \includegraphics[scale=0.5]{coniqueBS-1.png} 
     423  \includegraphics{coniqueBS.png} 
    429424  \caption{Projection conique - Hémisphère sud.} 
    430425\end{figure} 
     
    448443\begin{figure}[ht] 
    449444  \centering 
    450   \includegraphics[scale=0.5]{bonne-1.png} 
     445  \includegraphics{Bonne.png} 
    451446  \caption{Projection de Bonne} 
    452447\end{figure} 
  • trunk/mp-geo/mp-geo.mp

    r41 r44  
    11%Package mp-geographie 
    22%Auteur:Christophe Poulain 
    3 %Version 0.55 
    4 %18/02/2008 
     3%Version 0.57 
     4%15/03/2008 
    55 
    66prologues:=2; 
     
    351351enddef; 
    352352 
     353 
    353354vardef Lecturelacs= 
    354355  nomfichiermul:=arborescence&"lacs.dat"; 
     
    388389enddef; 
    389390 
    390 vardef Lecturelacssup= 
    391   nomfichiermul:=arborescence&"lacssup.dat"; 
    392   nblec:=scantokens readfrom nomfichiermul; 
    393   for p=1 upto nblec: 
    394     color Coord[],Pays[]; 
    395     numeric ll; 
    396     ll:=0; 
    397     nbpts:=scantokens readfrom nomfichiermul; 
    398     for k=1 upto nbpts: 
    399       pair latlon; 
    400       latlon=scantokens readfrom nomfichiermul; 
    401       Coord[k]=rayon*(cosd(xpart(latlon))*cosd(ypart(latlon)),cosd(xpart(latlon))*sind(ypart(latlon)),sind(xpart(latlon))); 
    402       if ((xpart(latlon)>phim) and (xpart(latlon)<phip)): 
    403         if ProduitScalaire(Coord[k]-pte3,Oeil-pte3)>0: 
    404           ll:=ll+1; 
    405           Pays[k]=Coord[k]; 
    406         else: 
    407           Pays[k]=2*Coord[k]; 
    408         fi; 
    409       else: 
    410         Pays[k]=2*Coord[k]; 
    411       fi; 
    412     endfor; 
    413     path pays; 
    414     if ll>0: 
    415       pays=Projgeo(Pays[1]) 
    416       for l=2 upto nbpts: 
    417         --Projgeo(Pays[l]) 
    418       endfor; 
    419       fill pays--cycle withcolor cielfonce; 
    420       draw pays; 
    421       clip currentpicture to cercles(pte3,pte1,pte3,pte1,pte4); 
    422     fi; 
    423   endfor; 
    424   closefrom nomfichiermul; 
    425 enddef; 
    426  
    427391vardef Lecturevolcans= 
    428392  drawoptions(withcolor orange); 
     
    486450enddef; 
    487451 
    488 vardef Lecturerivieressup= 
    489   nomfichiermul:=arborescence&"fleuvessup.dat"; 
    490   nblec:=scantokens readfrom nomfichiermul; 
    491   for p=1 upto nblec: 
    492     color Coord[],fond,Pays[]; 
    493     numeric ll; 
    494     ll:=0; 
    495     nbpts:=scantokens readfrom nomfichiermul; 
    496     for k=1 upto nbpts: 
    497       pair latlon; 
    498       latlon=scantokens readfrom nomfichiermul; 
    499       Coord[k]=rayon*(cosd(xpart(latlon))*cosd(ypart(latlon)),cosd(xpart(latlon))*sind(ypart(latlon)),sind(xpart(latlon))); 
    500       if ((xpart(latlon)>phim) and (xpart(latlon)<phip)): 
    501         if ProduitScalaire(Coord[k]-pte3,Oeil-pte3)>0: 
    502           ll:=ll+1; 
    503           Pays[k]=Coord[k]; 
    504         else: 
    505           Pays[k]=2*Coord[k]; 
    506         fi; 
    507       else: 
    508         Pays[k]=2*Coord[k]; 
    509       fi; 
    510     endfor; 
    511     path pays; 
    512     if ll>0: 
    513       pays=Projgeo(Pays[1]) 
    514       for l=2 upto nbpts: 
    515         --Projgeo(Pays[l]) 
    516       endfor; 
    517       draw pays withcolor cielfonce; 
    518       clip currentpicture to cercles(pte3,pte1,pte3,pte1,pte4); 
    519     fi; 
    520   endfor; 
    521   closefrom nomfichiermul; 
    522 enddef; 
    523  
    524452vardef Lecturecapitales= 
    525453  marque_p:="creux"; 
     
    666594  fi; 
    667595  nblec:=scantokens readfrom nomfichiermul; 
    668   if projection="bonne": 
     596  if projection="boone": 
    669597    nblec:=nblec-1 
    670598  fi; 
     
    797725enddef; 
    798726 
    799 vardef Lecturelacspsup= 
    800   nomfichiermul:=arborescence&"lacssup.dat"; 
    801   nblec:=scantokens readfrom nomfichiermul; 
    802   for p=1 upto nblec: 
    803     pair Coord[]; 
    804     nbpts:=scantokens readfrom nomfichiermul; 
    805     numeric ll; 
    806     ll=0; 
    807     for k=1 upto nbpts: 
    808       pair latlon; 
    809       latlon=scantokens readfrom nomfichiermul; 
    810       if projection="mercator": 
    811         Coord[k]=mercatorc(xpart(latlon),ypart(latlon)); 
    812       elseif projection="simple": 
    813         Coord[k]=simplec(xpart(latlon),ypart(latlon)); 
    814       elseif projection="cylindrique": 
    815         Coord[k]=cylindriquec(xpart(latlon),ypart(latlon)); 
    816       elseif projection="bonne": 
    817         Coord[k]=bonnec(xpart(latlon),ypart(latlon)); 
    818       elseif projection="coniqueh": 
    819         if (xpart(latlon)>0) or (xpart(latlon)=0): 
    820           ll:=ll+1; 
    821           Coord[ll]=coniquec(xpart(latlon),ypart(latlon),45); 
    822         fi; 
    823       elseif projection="coniqueb": 
    824         if (xpart(latlon)<0): 
    825           ll:=ll+1; 
    826           Coord[ll]=coniquec(xpart(latlon),ypart(latlon),-45); 
    827         fi; 
    828       fi; 
    829     endfor; 
    830     path lac; 
    831     if (projection="mercator") or (projection="cylindrique") or (projection="simple") or (projection="bonne"): 
    832       ll:=nbpts 
    833     fi; 
    834     if ll>0: 
    835       lac=Coord[1] 
    836       for l=2 upto ll: 
    837         --Coord[l] 
    838       endfor; 
    839       fill lac--cycle withcolor cielfonce; 
    840       draw lac; 
    841     fi; 
    842   endfor; 
    843   closefrom nomfichiermul; 
    844 enddef; 
    845  
    846727vardef Lecturerivieresp= 
    847728  nomfichiermul:=arborescence&"rivieres.dat"; 
     
    890771enddef; 
    891772 
    892 vardef Lecturerivierespsup= 
    893   nomfichiermul:=arborescence&"fleuvessup.dat"; 
    894   nblec:=scantokens readfrom nomfichiermul; 
    895   for p=1 upto nblec: 
    896     pair Coord[]; 
    897     nbpts:=scantokens readfrom nomfichiermul; 
    898     numeric ll; 
    899     ll:=0; 
    900     for k=1 upto nbpts: 
    901       pair latlon; 
    902       latlon=scantokens readfrom nomfichiermul; 
    903       if projection="mercator": 
    904         Coord[k]=mercatorc(xpart(latlon),ypart(latlon)); 
    905       elseif projection="simple": 
    906         Coord[k]=simplec(xpart(latlon),ypart(latlon)); 
    907       elseif projection="cylindrique": 
    908         Coord[k]=cylindriquec(xpart(latlon),ypart(latlon)); 
    909       elseif projection="bonne": 
    910         Coord[k]=bonnec(xpart(latlon),ypart(latlon)); 
    911       elseif projection="coniqueh": 
    912         if (xpart(latlon)>0) or (xpart(latlon)=0): 
    913           ll:=ll+1; 
    914           Coord[ll]=coniquec(xpart(latlon),ypart(latlon),45); 
    915         fi; 
    916       elseif projection="coniqueb": 
    917         if (xpart(latlon)<0): 
    918           ll:=ll+1; 
    919           Coord[ll]=coniquec(xpart(latlon),ypart(latlon),-45); 
    920         fi; 
    921       fi; 
    922     endfor; 
    923     path riv; 
    924     if (projection="mercator") or (projection="cylindrique") or (projection="simple") or (projection="bonne"): 
    925       ll:=nbpts; 
    926     fi; 
    927     if ll>0: 
    928       riv=Coord[1] 
    929       for l=2 upto ll: 
    930         --Coord[l] 
    931       endfor; 
    932       draw riv withcolor cielfonce; 
    933     fi; 
    934   endfor; 
    935   closefrom nomfichiermul; 
    936 enddef; 
    937  
    938773vardef Lecturecapitalesp= 
    939774  marque_p:="creux"; 
     
    1120955  if lacs=true: 
    1121956    Lecturelacsp; 
    1122     Lecturelacspsup; 
    1123957  fi; 
    1124958  Lectureilesp; 
     
    1128962  if fleuves=true: 
    1129963    Lecturerivieresp; 
    1130     Lecturerivierespsup; 
    1131964  fi; 
    1132965  if maillage=true: 
     
    1149982  if lacs=true: 
    1150983    Lecturelacsp; 
    1151     Lecturelacspsup; 
    1152984  fi; 
    1153985  Lectureilesp; 
     
    1157989  if fleuves=true: 
    1158990    Lecturerivieresp; 
    1159     Lecturerivierespsup; 
    1160991  fi; 
    1161992  if maillage=true: 
     
    11781009  if lacs=true: 
    11791010    Lecturelacsp; 
    1180     Lecturelacspsup; 
    11811011  fi; 
    11821012  Lectureilesp; 
     
    11861016  if fleuves=true: 
    11871017    Lecturerivieresp; 
    1188     Lecturerivierespsup; 
    11891018  fi; 
    11901019  if maillage=true: 
     
    12081037  if lacs=true: 
    12091038    Lecturelacsp; 
    1210     Lecturelacspsup; 
    12111039  fi; 
    12121040  Lectureilesp; 
     
    12161044  if fleuves=true: 
    12171045    Lecturerivieresp; 
    1218     Lecturerivierespsup; 
    12191046  fi; 
    12201047  if maillage=true: 
     
    12371064  if lacs=true: 
    12381065    Lecturelacsp; 
    1239     Lecturelacspsup; 
    12401066  fi; 
    12411067  Lectureilesp; 
     
    12451071  if fleuves=true: 
    12461072    Lecturerivieresp; 
    1247     Lecturerivierespsup; 
    12481073  fi; 
    12491074  drawoptions(withcolor gris); 
     
    12631088  if lacs=true: 
    12641089    Lecturelacsp; 
    1265     Lecturelacspsup; 
    12661090  fi; 
    12671091  Lectureilesp; 
     
    12711095  if fleuves=true: 
    12721096    Lecturerivieresp; 
    1273     Lecturerivierespsup; 
    12741097  fi; 
    12751098  drawoptions(withcolor gris); 
     
    13271150  if lacs=true: 
    13281151    Lecturelacs; 
    1329     Lecturelacssup; 
    13301152  fi; 
    13311153  Lectureiles; 
     
    13351157  if fleuves=true: 
    13361158    Lecturerivieres; 
    1337     Lecturerivieressup; 
    13381159  fi; 
    13391160  if maillage=true: