Changeset 37
- Timestamp:
- 03/14/08 22:45:46 (8 months ago)
- Files:
-
- trunk/mp-geo/docpdf.tex (modified) (3 diffs)
- trunk/mp-geo/mp-geo.mp (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/mp-geo/docpdf.tex
r9 r37 139 139 un problème d'accès direct à des pays comme Cuba ou l'Australie. Un 140 140 autre souci à régler\ldots}. Enfin les lacs sont regroupés dans un 141 seul fichier ainsi que pour les fleuves et rivières. 142 \\\`A noter que les lacs, les fleuves et les capitales sont {\em 143 optionnels}; leur affichage est fait par défaut sauf pour 144 \verb!capitales!; mais l'utilisateur peut en décider autrement en 145 changeant les paramètres \verb!lacs!, \verb!fleuves! et 146 \verb!capitales! à \verb!false!. Ceci peut être non négligeable lors 147 de la mesure du temps de compilation. Par exemple, le temps de 141 seul fichier ainsi que pour les fleuves et rivières et les 142 volcans\footnote{Ce sont les 813 volcans qui ont eu une éruption ces 143 10\,000 dernières années.}. 144 \\\`A noter que les lacs, les fleuves, les capitales et les volcans 145 sont {\em optionnels}; leur affichage est fait par défaut sauf pour 146 les capitales et volcans; mais l'utilisateur peut en décider 147 autrement en changeant les paramètres \verb!lacs!, \verb!fleuves!, 148 \verb!capitales! et \verb!volcans! à \verb!false!. Ceci peut être non 149 négligeable lors de la mesure du temps de compilation. Par exemple, le temps de 148 150 compilation de la figure \ding{172} a été de 37~s alors que pour la 149 151 figure \ding{173}, la compilation a duré 27~s. … … 269 271 \includegraphics[scale=0.7]{polesud} 270 272 \caption{L'immensité du pôle sud ($\theta=0$; $\phi=90$\degres).} 273 \end{figure} 274 Ooops ! une petite dernière\ldots\footnote{Ne cherchez pas après les 275 fonctionnalités pour la transparence, elles ne sont pas implémentées 276 dans le package; elles ne sont valables que dans des cas 277 particuliers\ldots} 278 \begin{figure}[ht] 279 \centering 280 \includegraphics{globetransparent.png} 281 \caption{Un peu de transparence.} 271 282 \end{figure} 272 283 \section{Projections planes} … … 454 465 \section{Historique} 455 466 \begin{description} 467 \item[14/03/2008] Version \texttt{0.58} : Ajout de fleuves et lacs 468 supplémentaires. 469 \item[14/03/2008] Version \texttt{0.56} : Ajout des volcans :). 456 470 \item[18/02/2008] Version \texttt{0.55} : Ajout des projections de Bonne. 457 471 \item[18/02/2008] Version \texttt{0.54} : Modification mineure dans la trunk/mp-geo/mp-geo.mp
r11 r37 31 31 tan=(0.824,0.705,0.55); 32 32 payscolor=tan; 33 34 vardef flamme=reverse(2mm*(0.5,1){dir90}..2mm*(0.75,1.5)..{dir90}2mm*(1,2))--2mm*(0.5,1){dir=-90}..2mm*(1,0.5)..{dir=90}2mm*(1.5,1)--((2mm*(0.5,1){dir90}..2mm*(0.75,1.5)..{dir90}2mm*(1,2)) reflectedabout (2mm*(1,0),2mm*(1,0)+2mm*(0,1)))--cycle 35 enddef; 33 36 34 37 %Les marques … … 348 351 enddef; 349 352 350 351 353 vardef Lecturelacs= 352 354 nomfichiermul:=arborescence&"lacs.dat"; … … 386 388 enddef; 387 389 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 vardef Lecturevolcans= 428 drawoptions(withcolor orange); 429 nomfichiermul:=arborescence&"volcans.dat"; 430 nblec:=scantokens readfrom nomfichiermul; 431 show nblec; 432 for p=1 upto nblec: 433 color Coord[],Pays[]; 434 pair latlon; 435 latlon=scantokens readfrom nomfichiermul; 436 Coord[p]=rayon*(cosd(xpart(latlon/60))*cosd(ypart(latlon/60)),cosd(xpart(latlon/60))*sind(ypart(latlon/60)),sind(xpart(latlon/60))); 437 if ((xpart(latlon/60)>phim) and (xpart(latlon/60)<phip)): 438 if ProduitScalaire(Coord[p]-pte3,Oeil-pte3)>0: 439 Pays[p]=Coord[p]; 440 fill flamme shifted Projgeo(Pays[p]) withcolor 1/2[orange,jaune]; 441 %else: 442 % Pays[k]=2*Coord[k]; 443 fi; 444 % else: 445 % Pays[k]=2*Coord[k]; 446 fi; 447 endfor; 448 closefrom nomfichiermul; 449 drawoptions(); 450 enddef; 451 388 452 vardef Lecturerivieres= 389 453 nomfichiermul:=arborescence&"rivieres.dat"; … … 399 463 Coord[k]=rayon*(cosd(xpart(latlon/60))*cosd(ypart(latlon/60)),cosd(xpart(latlon/60))*sind(ypart(latlon/60)),sind(xpart(latlon/60))); 400 464 if ((xpart(latlon/60)>phim) and (xpart(latlon/60)<phip)): 465 if ProduitScalaire(Coord[k]-pte3,Oeil-pte3)>0: 466 ll:=ll+1; 467 Pays[k]=Coord[k]; 468 else: 469 Pays[k]=2*Coord[k]; 470 fi; 471 else: 472 Pays[k]=2*Coord[k]; 473 fi; 474 endfor; 475 path pays; 476 if ll>0: 477 pays=Projgeo(Pays[1]) 478 for l=2 upto nbpts: 479 --Projgeo(Pays[l]) 480 endfor; 481 draw pays withcolor cielfonce; 482 clip currentpicture to cercles(pte3,pte1,pte3,pte1,pte4); 483 fi; 484 endfor; 485 closefrom nomfichiermul; 486 enddef; 487 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)): 401 501 if ProduitScalaire(Coord[k]-pte3,Oeil-pte3)>0: 402 502 ll:=ll+1; … … 697 797 enddef; 698 798 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 699 846 vardef Lecturerivieresp= 700 847 nomfichiermul:=arborescence&"rivieres.dat"; … … 725 872 ll:=ll+1; 726 873 Coord[ll]=coniquec(xpart(latlon/60),ypart(latlon/60),-45); 874 fi; 875 fi; 876 endfor; 877 path riv; 878 if (projection="mercator") or (projection="cylindrique") or (projection="simple") or (projection="bonne"): 879 ll:=nbpts; 880 fi; 881 if ll>0: 882 riv=Coord[1] 883 for l=2 upto ll: 884 --Coord[l] 885 endfor; 886 draw riv withcolor cielfonce; 887 fi; 888 endfor; 889 closefrom nomfichiermul; 890 enddef; 891 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); 727 920 fi; 728 921 fi; … … 927 1120 if lacs=true: 928 1121 Lecturelacsp; 1122 Lecturelacspsup; 929 1123 fi; 930 1124 Lectureilesp; … … 934 1128 if fleuves=true: 935 1129 Lecturerivieresp; 1130 Lecturerivierespsup; 936 1131 fi; 937 1132 if maillage=true: … … 954 1149 if lacs=true: 955 1150 Lecturelacsp; 1151 Lecturelacspsup; 956 1152 fi; 957 1153 Lectureilesp; … … 961 1157 if fleuves=true: 962 1158 Lecturerivieresp; 1159 Lecturerivierespsup; 963 1160 fi; 964 1161 if maillage=true: … … 981 1178 if lacs=true: 982 1179 Lecturelacsp; 1180 Lecturelacspsup; 983 1181 fi; 984 1182 Lectureilesp; … … 988 1186 if fleuves=true: 989 1187 Lecturerivieresp; 1188 Lecturerivierespsup; 990 1189 fi; 991 1190 if maillage=true: … … 1009 1208 if lacs=true: 1010 1209 Lecturelacsp; 1210 Lecturelacspsup; 1011 1211 fi; 1012 1212 Lectureilesp; … … 1016 1216 if fleuves=true: 1017 1217 Lecturerivieresp; 1218 Lecturerivierespsup; 1018 1219 fi; 1019 1220 if maillage=true: … … 1036 1237 if lacs=true: 1037 1238 Lecturelacsp; 1239 Lecturelacspsup; 1038 1240 fi; 1039 1241 Lectureilesp; … … 1043 1245 if fleuves=true: 1044 1246 Lecturerivieresp; 1247 Lecturerivierespsup; 1045 1248 fi; 1046 1249 drawoptions(withcolor gris); … … 1060 1263 if lacs=true: 1061 1264 Lecturelacsp; 1265 Lecturelacspsup; 1062 1266 fi; 1063 1267 Lectureilesp; … … 1067 1271 if fleuves=true: 1068 1272 Lecturerivieresp; 1273 Lecturerivierespsup; 1069 1274 fi; 1070 1275 drawoptions(withcolor gris); … … 1077 1282 rayon:=2; 1078 1283 1079 boolean fleuves,lacs,capitales,noncolore,maillage ;1284 boolean fleuves,lacs,capitales,noncolore,maillage,volcans; 1080 1285 fleuves=true; 1081 1286 lacs=true; … … 1083 1288 noncolore=false; 1084 1289 maillage=false; 1290 volcans=false; 1085 1291 1086 1292 vardef Mappemonde(expr longobs,latobs)= … … 1116 1322 Lecture("Ceurope.dat"); 1117 1323 Lecture("Cafrique.dat"); 1324 if volcans=true: 1325 Lecturevolcans; 1326 fi; 1118 1327 if lacs=true: 1119 1328 Lecturelacs; 1329 Lecturelacssup; 1120 1330 fi; 1121 1331 Lectureiles; … … 1125 1335 if fleuves=true: 1126 1336 Lecturerivieres; 1337 Lecturerivieressup; 1127 1338 fi; 1128 1339 if maillage=true:
