diff options
author | Norbert Preining <norbert@preining.info> | 2023-07-05 03:01:54 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-07-05 03:01:54 +0000 |
commit | 973c785dccc1812d63162178e8362e83e8c263c2 (patch) | |
tree | b2cb12a6b36a0a59e90f1611d32cf7e8d125d575 /macros/latex/contrib/profcollege/metapost | |
parent | ab7f5e4df027c13f5aef4fbdb032184cf2f3d5c3 (diff) |
CTAN sync 202307050301
Diffstat (limited to 'macros/latex/contrib/profcollege/metapost')
-rw-r--r-- | macros/latex/contrib/profcollege/metapost/PfCMonde.mp (renamed from macros/latex/contrib/profcollege/metapost/PfCMonde-futurenew.mp) | 172 | ||||
-rw-r--r-- | macros/latex/contrib/profcollege/metapost/PfCObjets.mp | 8 | ||||
-rw-r--r-- | macros/latex/contrib/profcollege/metapost/PfCScratch.mp | 51 | ||||
-rw-r--r-- | macros/latex/contrib/profcollege/metapost/PfCSolid.mp | 17 |
4 files changed, 134 insertions, 114 deletions
diff --git a/macros/latex/contrib/profcollege/metapost/PfCMonde-futurenew.mp b/macros/latex/contrib/profcollege/metapost/PfCMonde.mp index 2e7b5977f8..11051483e4 100644 --- a/macros/latex/contrib/profcollege/metapost/PfCMonde-futurenew.mp +++ b/macros/latex/contrib/profcollege/metapost/PfCMonde.mp @@ -547,7 +547,7 @@ vardef Lecturecapitales= enddef; vardef Lecture(expr Nomfichier)= - NomFichier:=arborescence&Nomfichier; + NomFichier:=arborescence&"PfC"&Nomfichier; nblec:=scantokens readfrom NomFichier; for w=1 upto nblec: if projection="non": @@ -1221,38 +1221,38 @@ vardef Projection(expr TH,PH,Zoom)= fill (bonnec(-90,-180) for k=-85 step 5 until 90:..bonnec(k,-180) endfor)..reverse(bonnec(-90,180) for k=-85 step 5 until 90:..bonnec(k,180) endfor)..cycle withcolor couleurfond; fi; if All=true: - Lecture("PfCCameriquesud.dat"); - Lecture("PfCCcaraibes.dat"); - Lecture("PfCCameriquecentrale.dat"); - Lecture("PfCCameriquenord.dat"); - Lecture("PfCCasia.dat"); - Lecture("PfCCeurope.dat"); - Lecture("PfCCafrique.dat"); + Lecture("Cameriquesud.dat"); + Lecture("Ccaraibes.dat"); + Lecture("Cameriquecentrale.dat"); + Lecture("Cameriquenord.dat"); + Lecture("Casia.dat"); + Lecture("Ceurope.dat"); + Lecture("Cafrique.dat"); else: if Amsud=true: - Lecture("PfCCameriquesud.dat"); + Lecture("Cameriquesud.dat"); fi; if Amnord=true: - Lecture("PfCCameriquenord.dat"); + Lecture("Cameriquenord.dat"); fi; if Amcentrale=true: - Lecture("PfCCameriquecentrale.dat"); + Lecture("Cameriquecentrale.dat"); fi; if Caraibes=true: - Lecture("PfCCcaraibes.dat"); + Lecture("Ccaraibes.dat"); fi; if Asie=true: if projection="bonne": - Lecture("PfCCasie.dat"); + Lecture("Casie.dat"); else: - Lecture("PfCCasia.dat"); + Lecture("Casia.dat"); fi; fi; if Europe=true: - Lecture("PfCCeurope.dat"); + Lecture("Ceurope.dat"); fi; if Afrique=true: - Lecture("PfCCafrique.dat"); + Lecture("Cafrique.dat"); fi; fi; if lacs=true: @@ -1288,13 +1288,13 @@ vardef Simple(expr TH,PH,Zoom)= theta:=TH; phi:=PH; zoom(Zoom); - Lecture("PfCCameriquesud.dat"); - Lecture("PfCCcaraibes.dat"); - Lecture("PfCCameriquecentrale.dat"); - Lecture("PfCCameriquenord.dat"); - Lecture("PfCCasia.dat"); - Lecture("PfCCeurope.dat"); - Lecture("PfCCafrique.dat"); + Lecture("Cameriquesud.dat"); + Lecture("Ccaraibes.dat"); + Lecture("Cameriquecentrale.dat"); + Lecture("Cameriquenord.dat"); + Lecture("Casia.dat"); + Lecture("Ceurope.dat"); + Lecture("Cafrique.dat"); if lacs=true: Lecturelacsp; Lecturelacspsup; @@ -1316,13 +1316,13 @@ vardef Mercator(expr TH,PH,Zoom)= theta:=TH; phi:=PH; zoom(Zoom); - Lecture("PfCCameriquesud.dat"); - Lecture("PfCCcaraibes.dat"); - Lecture("PfCCameriquecentrale.dat"); - Lecture("PfCCameriquenord.dat"); - Lecture("PfCCasia.dat"); - Lecture("PfCCeurope.dat"); - Lecture("PfCCafrique.dat"); + Lecture("Cameriquesud.dat"); + Lecture("Ccaraibes.dat"); + Lecture("Cameriquecentrale.dat"); + Lecture("Cameriquenord.dat"); + Lecture("Casia.dat"); + Lecture("Ceurope.dat"); + Lecture("Cafrique.dat"); if lacs=true: Lecturelacsp; Lecturelacspsup; @@ -1344,13 +1344,13 @@ vardef Winkel(expr TH,PH,Zoom)= theta:=TH; phi:=PH; zoom(Zoom); - Lecture("PfCCameriquesud.dat"); - Lecture("PfCCcaraibes.dat"); - Lecture("PfCCameriquecentrale.dat"); - Lecture("PfCCameriquenord.dat"); - Lecture("PfCCasia.dat"); - Lecture("PfCCeurope.dat"); - Lecture("PfCCafrique.dat"); + Lecture("Cameriquesud.dat"); + Lecture("Ccaraibes.dat"); + Lecture("Cameriquecentrale.dat"); + Lecture("Cameriquenord.dat"); + Lecture("Casia.dat"); + Lecture("Ceurope.dat"); + Lecture("Cafrique.dat"); if lacs=true: Lecturelacsp; Lecturelacspsup; @@ -1372,13 +1372,13 @@ vardef Cylindrique(expr TH,PH,Zoom)= theta:=TH; phi:=PH; zoom(Zoom); - Lecture("PfCCameriquesud.dat"); - Lecture("PfCCcaraibes.dat"); - Lecture("PfCCameriquecentrale.dat"); - Lecture("PfCCameriquenord.dat"); - Lecture("PfCCasia.dat"); - Lecture("PfCCeurope.dat"); - Lecture("PfCCafrique.dat"); + Lecture("Cameriquesud.dat"); + Lecture("Ccaraibes.dat"); + Lecture("Cameriquecentrale.dat"); + Lecture("Cameriquenord.dat"); + Lecture("Casia.dat"); + Lecture("Ceurope.dat"); + Lecture("Cafrique.dat"); if lacs=true: Lecturelacsp; Lecturelacspsup; @@ -1401,13 +1401,13 @@ vardef Bonne(expr TH,PH,Zoom)= phi:=PH; zoom(Zoom); fill (bonnec(-90,-180) for k=-85 step 5 until 90:..bonnec(k,-180) endfor)..reverse(bonnec(-90,180) for k=-85 step 5 until 90:..bonnec(k,180) endfor)..cycle withcolor couleurfond; - Lecture("PfCCameriquesud.dat"); - Lecture("PfCCcaraibes.dat"); - Lecture("PfCCameriquecentrale.dat"); - Lecture("PfCCameriquenord.dat"); - Lecture("PfCCasie.dat"); - Lecture("PfCCeurope.dat"); - Lecture("PfCCafrique.dat"); + Lecture("Cameriquesud.dat"); + Lecture("Ccaraibes.dat"); + Lecture("Cameriquecentrale.dat"); + Lecture("Cameriquenord.dat"); + Lecture("Casie.dat"); + Lecture("Ceurope.dat"); + Lecture("Cafrique.dat"); if lacs=true: Lecturelacsp; Lecturelacspsup; @@ -1429,13 +1429,13 @@ enddef; vardef ConiqueH= projection:="coniqueh"; - Lecture("PfCCameriquesud.dat"); - Lecture("PfCCcaraibes.dat"); - Lecture("PfCCameriquecentrale.dat"); - Lecture("PfCCameriquenord.dat"); - Lecture("PfCCasie.dat"); - Lecture("PfCCeurope.dat"); - Lecture("PfCCafrique.dat"); + Lecture("Cameriquesud.dat"); + Lecture("Ccaraibes.dat"); + Lecture("Cameriquecentrale.dat"); + Lecture("Cameriquenord.dat"); + Lecture("Casie.dat"); + Lecture("Ceurope.dat"); + Lecture("Cafrique.dat"); if lacs=true: Lecturelacsp; Lecturelacspsup; @@ -1455,13 +1455,13 @@ enddef; vardef ConiqueB= projection:="coniqueb"; - Lecture("PfCCameriquesud.dat"); - Lecture("PfCCcaraibes.dat"); - Lecture("PfCCameriquecentrale.dat"); - Lecture("PfCCameriquenord.dat"); - Lecture("PfCCasie.dat"); - Lecture("PfCCeurope.dat"); - Lecture("PfCCafrique.dat"); + Lecture("Cameriquesud.dat"); + Lecture("Ccaraibes.dat"); + Lecture("Cameriquecentrale.dat"); + Lecture("Cameriquenord.dat"); + Lecture("Casie.dat"); + Lecture("Ceurope.dat"); + Lecture("Cafrique.dat"); if lacs=true: Lecturelacsp; Lecturelacspsup; @@ -1521,27 +1521,27 @@ vardef Mappemonde(expr longobs,latobs)= phip:=phii; fi; fill cercles(pte3,pte1,pte3,pte1,pte4) withcolor couleurfond; - Lecture("PfCCameriquesud.dat"); - Lecture("PfCCcaraibes.dat"); - Lecture("PfCCameriquecentrale.dat"); - Lecture("PfCCameriquenord.dat"); - Lecture("PfCCasie.dat"); - Lecture("PfCCeurope.dat"); - Lecture("PfCCafrique.dat"); +% Lecture("Cameriquesud.dat"); +% Lecture("Ccaraibes.dat"); +% Lecture("Cameriquecentrale.dat"); +% Lecture("Cameriquenord.dat"); +% Lecture("Casie.dat"); +% Lecture("Ceurope.dat"); +% Lecture("Cafrique.dat"); if volcans=true: - Lecturevolcans; +% Lecturevolcans; fi; if lacs=true: - Lecturelacs; - Lecturelacssup; +% Lecturelacs; +% Lecturelacssup; fi; - Lectureiles; +% Lectureiles; if capitales=true: - Lecturecapitales; +% Lecturecapitales; fi; if fleuves=true: - Lecturerivieres; - %Lecturerivieressup; +% Lecturerivieres; +% %Lecturerivieressup; fi; if maillage=true: drawoptions(withcolor couleurmaillage); @@ -1580,13 +1580,13 @@ vardef mappemonde(expr longobs,latobs)= phip:=phii; fi; fill cercles(pte3,pte1,pte3,pte1,pte4) withcolor couleurfond; - Lecture("PfCCameriquesud.dat"); - Lecture("PfCCcaraibes.dat"); - Lecture("PfCCameriquecentrale.dat"); - Lecture("PfCCameriquenord.dat"); - Lecture("PfCCasie.dat"); - Lecture("PfCCeurope.dat"); - Lecture("PfCCafrique.dat"); + Lecture("Cameriquesud.dat"); + Lecture("Ccaraibes.dat"); + Lecture("Cameriquecentrale.dat"); + Lecture("Cameriquenord.dat"); + Lecture("Casie.dat"); + Lecture("Ceurope.dat"); + Lecture("Cafrique.dat"); if volcans=true: Lecturevolcans; fi; diff --git a/macros/latex/contrib/profcollege/metapost/PfCObjets.mp b/macros/latex/contrib/profcollege/metapost/PfCObjets.mp index 3d6571c808..6998c54e26 100644 --- a/macros/latex/contrib/profcollege/metapost/PfCObjets.mp +++ b/macros/latex/contrib/profcollege/metapost/PfCObjets.mp @@ -834,10 +834,10 @@ vardef ObjetSphereCabinet[](expr Rn)= for l=0 upto (subh-1): tcpt.@[apj]:=apj; OTFc.@[apj].nb:=4; - OTFc.@[apj][1]:=(Famille(umin+(k+1)*upas,vmin+l*vpas));%1 - OTFc.@[apj][2]:=(Famille(umin+k*upas,vmin+l*vpas));%2 - OTFc.@[apj][3]:=(Famille(umin+k*upas,vmin+(l+1)*vpas));%3 - OTFc.@[apj][4]:=(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas));%4 + OTFc.@[apj][1]:=Famille(umin+(k+1)*upas,vmin+l*vpas);%1 + OTFc.@[apj][2]:=Famille(umin+k*upas,vmin+l*vpas);%2 + OTFc.@[apj][3]:=Famille(umin+k*upas,vmin+(l+1)*vpas);%3 + OTFc.@[apj][4]:=Famille(umin+(k+1)*upas,vmin+(l+1)*vpas);%4 OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso)); PfCPS:=ProduitScalaire(Oeil-OTFc.@[apj][1],Normal(OTFc.@[apj][1],OTFc.@[apj][2],OTFc.@[apj][3]))/1000; diff --git a/macros/latex/contrib/profcollege/metapost/PfCScratch.mp b/macros/latex/contrib/profcollege/metapost/PfCScratch.mp index b3edc8af1f..18fe1c904a 100644 --- a/macros/latex/contrib/profcollege/metapost/PfCScratch.mp +++ b/macros/latex/contrib/profcollege/metapost/PfCScratch.mp @@ -15,7 +15,6 @@ numeric Nblignes; Nblignes:=1; pair DebutListe; DebutListe=(0,0); boolean NumeroteLignes; NumeroteLignes=false; boolean NumeroteFinBloc; NumeroteFinBloc=false; - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% couleurs color CoulLignes; CoulLignes:=black; color ColBloc; % alias des couleurs de bloc @@ -57,7 +56,7 @@ def Place expr o = enddef; def Placer expr o = - if path o: draw o else: draw o fi + if path o: draw o else: draw o fi; enddef; %impression @@ -819,8 +818,8 @@ enddef; vardef Tournerg(expr nbpas)= LONG:=0; - save $; - picture $, texto; + save Tourner; + picture Tourner, texto; if string nbpas: if symbole=true: texto=ColleBoxNew("tourner",Arcgauche,"de",OvalNb(nbpas),"degré(s)"); @@ -835,8 +834,8 @@ vardef Tournerg(expr nbpas)= fi; fi; ColBloc:=BleuMouvTrois; - $=Affichage(texto); - $ + Tourner=Affichage(texto); + Tourner enddef; vardef Orienter(expr nbpas)= @@ -1398,8 +1397,8 @@ vardef NoteImage= save $; picture $; $=image( - linecap := butt; - linejoin := mitered; +% linecap := butt; +% linejoin := mitered; fill (80.695297,716.262024)..controls (80.574203,716.257996) and (80.476601,716.171997)..(80.480499,716.062988) --(80.687500,704.125000)..controls (79.941399,704.570007) and (78.644501,704.637024)..(77.312500,704.223022) ..controls (75.503899,703.659973) and (74.339798,702.429993)..(74.710899,701.473022) @@ -1548,8 +1547,8 @@ vardef CrayonImage= picture cray; cray=image(% drawoptions (if print=false:withcolor (0.298050,0.556850,0.917650) fi); - linecap := butt; - linejoin := mitered; +% linecap := butt; +% linejoin := mitered; fill (0.960938,1.390630)--(1.644530,2.996090)..controls (1.730470,3.199220) and (1.917970,3.500000)..(2.062500,3.664060)..controls (2.324220,3.968750) and (3.539060,2.753910)..(3.234380,2.488280)..controls (3.070310,2.343750) and (2.769530,2.160160)..(2.566410,2.074220)--cycle; drawoptions (withcolor (0.349030,0.368640,0.450970)); pickup pencircle scaled 0.498140bp; @@ -2197,8 +2196,8 @@ enddef; vardef DrapeauImage= save $; picture $; $=image( - linecap := butt; - linejoin := rounded; +% linecap := butt; +% linejoin := rounded; if print = false: drawoptions(withcolor(76/255,191/255,86/255)) fi; fill (72.000000,713.254028)--(72.000000,718.918030)--(72.507797,718.979980) --(72.984398,719.026978)--(73.437500,719.054993)--(73.867203,719.070007) @@ -2350,7 +2349,7 @@ vardef CommandeVide(expr commande)= picture $,texto,TEXT; if string commande : texto=image( - label.lrt(TEX("\barre \hbox to"&commande&"cm{}"),if unknown _coinprec: (0,0) else:_coinprec fi); + label.lrt(TEX("\sffamily\bfseries\longbarre \hbox to"&commande&"cm{}"),if unknown _coinprec: (0,0) else:_coinprec fi); ); else: texto=commande; @@ -2365,18 +2364,12 @@ vardef LigneVide= save $; picture $,texto,TEXT; texto=image( - label.lrt(TEX("\barre \hbox to2cm{}"),if unknown _coinprec: (0,0) else:_coinprec fi); + label.lrt(TEX("\sffamily\bfseries\longbarre \hbox to4cm{}"),if unknown _coinprec: (0,0) else:_coinprec fi); ); TEXT=image( path cadre; cadre=CADRE(texto); unfill cadre; - %draw (urcorner texto+(0,eb))-- - % (ulcorner texto+(0.625cm,0)+(eb,eb)){dir180}.. - % {dir180}(ulcorner texto+(0.625cm,0))-- - % (ulcorner texto+(0.375cm,0)){dir180}.. - % {dir180}(ulcorner texto+(0.375cm,0)+(-eb,eb))-- - % (ulcorner texto+(0,eb)) withpen pencircle scaled 0; ); $=TEXT shifted (if unknown _coinprec:(0,0) else :_coinprec fi - ulcorner TEXT); _coinprec:=llcorner $; @@ -2390,6 +2383,7 @@ fi; $ enddef; + vardef LigneVideVar(expr commande)= LONG:=0; save $; @@ -2415,6 +2409,7 @@ TEXT=image( (ulcorner texto+(0.375cm,0)+(-eb,eb))-- (ulcorner texto+(0,eb))--(ulcorner texto+(-eb,0))--cycle; fill cadre withcolor white; + draw cadre; % draw (urcorner texto+(0,eb))-- % (ulcorner texto+(0.625cm,0)+(eb,eb))-- % (ulcorner texto+(0.625cm,0))-- @@ -2434,6 +2429,22 @@ fi; $ enddef; +vardef LigneVideVarUn(expr commande)= + LONG:=0; + save $; + picture $,texto,TEXT; + if string texto: + texto=image( + label.lrt(TEX("\barre \hbox to2cm{}"),if unknown _coinprec: (0,0) else:_coinprec fi); + ); +else: + texto=commande; +fi; +ColBloc:=white; +$=Affichage(texto); +$ +enddef; + vardef LignePointilles= LONG:=0; save $; diff --git a/macros/latex/contrib/profcollege/metapost/PfCSolid.mp b/macros/latex/contrib/profcollege/metapost/PfCSolid.mp index bc4b9517ee..b5f90b3ae4 100644 --- a/macros/latex/contrib/profcollege/metapost/PfCSolid.mp +++ b/macros/latex/contrib/profcollege/metapost/PfCSolid.mp @@ -107,6 +107,10 @@ vardef GCoord(expr N)= (-Xpart(N)*Aux1+Ypart(N)*Aux3,-Xpart(N)*Aux5-Ypart(N)*Aux6+Zpart(N)*Aux4,-Xpart(N)*Aux7-Ypart(N)*Aux8-Zpart(N)*Aux2+Rho) enddef; +vardef GCoordcabinet(expr N)= + (-(Xpart(N)*sind(30)*0.5)*Aux1+Ypart(N)*cosd(30)*Aux3,-(Xpart(N)*cosd(30)*0.5)*Aux5-Ypart(N)*Aux6+Zpart(N)*Aux4,-Xpart(N)*Aux7-Ypart(N)*Aux8-Zpart(N)*Aux2+Rho) +enddef; + unit:=1;%pour les mises à l'échelle :) Merci pst-solides3d vardef Projette(expr M)= @@ -116,8 +120,13 @@ vardef Projette(expr M)= (Xpart(GCoord(M)),Ypart(GCoord(M)))*unit*DE elseif typerepre="cabinet": % (0.5*cosd(30)*Xpart(GCoord(M)),0.75*sind(30)*Ypart(GCoord(M)))*unit*DE - (Xpart(GCoord(M))+0.5*cosd(30)*Zpart(GCoord(M)),Ypart(GCoord(M))+0.5*sind(30)*Zpart(GCoord(M)))*20 -% (0.5*cosd(45)*Xpart(GCoord(M)),0.5*sind(45)*Ypart(GCoord(M)))*unit*DE +% (Xpart(M)+0.5*cosd(30)*Zpart(M),Ypart(M)+0.5*sind(30)*Zpart(M))*20 + %(Xpart(M)+0.5*cosd(30)*Ypart(M),Zpart(M)+0.5*sind(30)*Ypart(M))*20 + %(Ypart(M)+0.5*cosd(30)*Xpart(M),Zpart(M)+0.5*sind(30)*Xpart(M))*20%Good avec Theta=-20/Phi=-10 + %(Ypart(GCoord(M))+0.5*cosd(-30)*Xpart(GCoord(M)),Zpart(GCoord(M))+0.5*sind(-30)*Xpart(GCoord(M)))*20%Good avec Theta=-20/Phi=-10 + (Xpart(GCoord(M))*cosd(90-30),Ypart(GCoord(M))*sind(90-30)*0.5)*DE%à garder peut-être +% (Zpart(GCoord(M))+0.5*cosd(-30)*Ypart(GCoord(M)),Xpart(GCoord(M))+0.5*sind(-30)*Ypart(GCoord(M)))*20 + % (0.5*cosd(45)*Xpart(GCoord(M)),0.5*sind(45)*Ypart(GCoord(M)))*unit*DE % (Xpart(GCoord(M)),Ypart(GCoord(M)))*unit*DE %(Xpart(GCoord(M)),Ypart(GCoord(M)))*10 fi @@ -1036,7 +1045,7 @@ vardef DefinirSommets(text t)= nbauto:=0; for p_=t: nbauto:=nbauto+1; - if unknown p_:p_=Sommet[nbauto]; else: p_:=Sommet[nbauto] fi; + if unknown p_: p_=Sommet[nbauto]; else: p_:=Sommet[nbauto]; fi; endfor; enddef; @@ -1045,7 +1054,7 @@ vardef DefinirSommetsSection(text t)= nbauto:=0; for p_=t: nbauto:=nbauto+1; - if unknown p_:p_=MSection[nbauto]; else: p_:=MSection[nbauto] fi; + if unknown p_: p_=MSection[nbauto]; else: p_:=MSection[nbauto]; fi; endfor; enddef; |