Changeset 44
- Timestamp:
- 03/18/08 21:28:57 (10 months ago)
- Files:
-
- trunk/mp-geo/doc/doc-mp-geo.tex (modified) (18 diffs)
- trunk/mp-geo/mp-geo.mp (modified) (21 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/mp-geo/doc/doc-mp-geo.tex
r43 r44 4 4 \usepackage[frenchb]{babel} 5 5 \usepackage[pdftex,a4paper,margin=1.5cm,nohead]{geometry} 6 %\usepackage[draft]{graphicx}7 6 \usepackage{graphicx} 8 7 \graphicspath{{figuresdoc/}} … … 11 10 12 11 \usepackage{calc,url,subfigure,amsmath} 13 \usepackage{ mflogo,manfnt,pifont,textcomp}12 \usepackage{fourier,mflogo,manfnt,pifont,textcomp} 14 13 \input{christ5} 15 \usepackage[charter]{mathdesign}16 17 18 14 \pagestyle{empty} 19 15 … … 46 42 \definecolor{LightRed}{rgb}{1,0.8,0.8} 47 43 48 \title{\texttt{mp-geo graphie}}44 \title{\texttt{mp-geo}} 49 45 \author{C.Poulain} 50 46 \date{\today} … … 52 48 \maketitle 53 49 \begin{abstract} 54 \texttt{mp-geo graphie} est un paquet \MP\ permettant de représenter la50 \texttt{mp-geo} est un paquet \MP\ permettant de représenter la 55 51 Terre. Il est possible de la voir sous n'importe quel angle. La 56 52 majorité des éléments présents réellement sont présents sur les … … 60 56 \begin{figure}[ht] 61 57 \centering 62 \includegraphics[scale=0. 7]{pagepresentation-1.png}58 \includegraphics[scale=0.8]{pagepresentation.png} 63 59 \caption{Vue de l'Asie ($\theta=90$\degres; $\phi=20$\degres).} 64 60 \label{Asie} 65 61 \end{figure} 66 \newpage67 62 \tableofcontents 68 63 \newpage … … 89 84 On doit être à l'aise avec cette valeur. ;-) 90 85 } 91 En effet, \texttt{mp-geo graphie} est un package gourmand en86 En effet, \texttt{mp-geo} est un package gourmand en 92 87 ressources. \`A titre d'exemple, la création de l'image \ref{Asie} a duré environ 26 secondes\footnote{Les réponses données 93 88 par la commande \texttt{time} sous Linux sont\\ … … 99 94 \section{Introduction} 100 95 Ce package est encore {\em en développement}. Par comparaison avec le 101 package PStricks \verb!pst-geo!, \verb!mp-geo graphie! comporte, dans l'état96 package PStricks \verb!pst-geo!, \verb!mp-geo! comporte, dans l'état 102 97 actuel, beaucoup moins de points de tracés\footnote{Les données 103 98 proviennent de la page \url{ftp://ftp.blm.gov/pub/gis/wdbprg.zip} … … 116 111 parlant de ce package, je tiens à remercier Manuel {\sc Luque} pour l'aide 117 112 et les encouragements qu'il a pu m'apporter durant l'élaboration de 118 \texttt{mp-geo graphie}.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} 122 117 \caption{Les grands lacs d'Amérique du Nord ($\theta=-105$\degres; 123 118 $\phi=45$\degres)} … … 157 152 \centering 158 153 \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}} 160 155 \end{figure} 161 156 Une autre option est celle de colorer uniformément ou pas les … … 166 161 \begin{figure}[ht] 167 162 \centering 168 \includegraphics[scale=0. 5]{mondenoncolore-1.png}163 \includegraphics[scale=0.7]{mondenoncolore.png} 169 164 \caption{Coloration uniforme ($\theta=105$\degres; $\phi=30$\degres).} 170 165 \label{unicolore} … … 176 171 \begin{figure}[ht] 177 172 \centering 178 \includegraphics[scale=0. 5]{oceaniemeridien-1.png}173 \includegraphics[scale=0.7]{oceaniemeridien.png} 179 174 \caption{Méridiens et parallèles ($\theta=120$\degres; $\phi=-20$\degres).} 180 175 \label{meridien} … … 273 268 \begin{figure}[ht] 274 269 \centering 275 \includegraphics[scale=0. 5]{polesud-1.png}270 \includegraphics[scale=0.7]{polesud} 276 271 \caption{L'immensité du pôle sud ($\theta=0$; $\phi=90$\degres).} 277 272 \end{figure} … … 282 277 \begin{figure}[ht] 283 278 \centering 284 \includegraphics [scale=0.5]{mp-geotrans-1.png}279 \includegraphics{globetransparent.png} 285 280 \caption{Un peu de transparence.} 286 281 \end{figure} … … 344 339 \begin{figure}[h] 345 340 \centering 346 \includegraphics [scale=0.5]{mercator-1.png}341 \includegraphics{Mercator.png} 347 342 \caption{Carte de France selon une projection Mercator.} 348 343 \end{figure} … … 381 376 \begin{figure}[ht] 382 377 \centering 383 \includegraphics [scale=0.5]{cylindrique-1.png}378 \includegraphics{Cylindrique.png} 384 379 \caption{Carte de France selon la projection cylindrique.} 385 380 \end{figure} … … 410 405 \begin{figure}[ht] 411 406 \centering 412 \includegraphics [scale=0.5]{coniqueHN-1.png}407 \includegraphics{coniqueHN.png} 413 408 \caption{Projection conique - Hémisphère nord.} 414 409 \end{figure} … … 426 421 \begin{figure}[ht] 427 422 \centering 428 \includegraphics [scale=0.5]{coniqueBS-1.png}423 \includegraphics{coniqueBS.png} 429 424 \caption{Projection conique - Hémisphère sud.} 430 425 \end{figure} … … 448 443 \begin{figure}[ht] 449 444 \centering 450 \includegraphics [scale=0.5]{bonne-1.png}445 \includegraphics{Bonne.png} 451 446 \caption{Projection de Bonne} 452 447 \end{figure} trunk/mp-geo/mp-geo.mp
r41 r44 1 1 %Package mp-geographie 2 2 %Auteur:Christophe Poulain 3 %Version 0.5 54 %1 8/02/20083 %Version 0.57 4 %15/03/2008 5 5 6 6 prologues:=2; … … 351 351 enddef; 352 352 353 353 354 vardef Lecturelacs= 354 355 nomfichiermul:=arborescence&"lacs.dat"; … … 388 389 enddef; 389 390 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 427 391 vardef Lecturevolcans= 428 392 drawoptions(withcolor orange); … … 486 450 enddef; 487 451 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 524 452 vardef Lecturecapitales= 525 453 marque_p:="creux"; … … 666 594 fi; 667 595 nblec:=scantokens readfrom nomfichiermul; 668 if projection="bo nne":596 if projection="boone": 669 597 nblec:=nblec-1 670 598 fi; … … 797 725 enddef; 798 726 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:=nbpts833 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 846 727 vardef Lecturerivieresp= 847 728 nomfichiermul:=arborescence&"rivieres.dat"; … … 890 771 enddef; 891 772 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 938 773 vardef Lecturecapitalesp= 939 774 marque_p:="creux"; … … 1120 955 if lacs=true: 1121 956 Lecturelacsp; 1122 Lecturelacspsup;1123 957 fi; 1124 958 Lectureilesp; … … 1128 962 if fleuves=true: 1129 963 Lecturerivieresp; 1130 Lecturerivierespsup;1131 964 fi; 1132 965 if maillage=true: … … 1149 982 if lacs=true: 1150 983 Lecturelacsp; 1151 Lecturelacspsup;1152 984 fi; 1153 985 Lectureilesp; … … 1157 989 if fleuves=true: 1158 990 Lecturerivieresp; 1159 Lecturerivierespsup;1160 991 fi; 1161 992 if maillage=true: … … 1178 1009 if lacs=true: 1179 1010 Lecturelacsp; 1180 Lecturelacspsup;1181 1011 fi; 1182 1012 Lectureilesp; … … 1186 1016 if fleuves=true: 1187 1017 Lecturerivieresp; 1188 Lecturerivierespsup;1189 1018 fi; 1190 1019 if maillage=true: … … 1208 1037 if lacs=true: 1209 1038 Lecturelacsp; 1210 Lecturelacspsup;1211 1039 fi; 1212 1040 Lectureilesp; … … 1216 1044 if fleuves=true: 1217 1045 Lecturerivieresp; 1218 Lecturerivierespsup;1219 1046 fi; 1220 1047 if maillage=true: … … 1237 1064 if lacs=true: 1238 1065 Lecturelacsp; 1239 Lecturelacspsup;1240 1066 fi; 1241 1067 Lectureilesp; … … 1245 1071 if fleuves=true: 1246 1072 Lecturerivieresp; 1247 Lecturerivierespsup;1248 1073 fi; 1249 1074 drawoptions(withcolor gris); … … 1263 1088 if lacs=true: 1264 1089 Lecturelacsp; 1265 Lecturelacspsup;1266 1090 fi; 1267 1091 Lectureilesp; … … 1271 1095 if fleuves=true: 1272 1096 Lecturerivieresp; 1273 Lecturerivierespsup;1274 1097 fi; 1275 1098 drawoptions(withcolor gris); … … 1327 1150 if lacs=true: 1328 1151 Lecturelacs; 1329 Lecturelacssup;1330 1152 fi; 1331 1153 Lectureiles; … … 1335 1157 if fleuves=true: 1336 1158 Lecturerivieres; 1337 Lecturerivieressup;1338 1159 fi; 1339 1160 if maillage=true:
