summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/metapost/profcollege
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-08-01 20:06:20 +0000
committerKarl Berry <karl@freefriends.org>2023-08-01 20:06:20 +0000
commit4f1cabae3381cd17b21ca6e7c89156edd09e23d5 (patch)
tree118c1bb04f98a769cc07bc8845ce1d44fcdacb71 /Master/texmf-dist/metapost/profcollege
parentdf7406293837602e2de77ae834b7ec9c822c436f (diff)
profcollege (1aug23)
git-svn-id: svn://tug.org/texlive/trunk@67787 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost/profcollege')
-rw-r--r--Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp10
-rw-r--r--Master/texmf-dist/metapost/profcollege/PfCLabyNombre.mp42
-rw-r--r--Master/texmf-dist/metapost/profcollege/PfCObjets.mp2
-rw-r--r--Master/texmf-dist/metapost/profcollege/PfCSolid.mp11
4 files changed, 57 insertions, 8 deletions
diff --git a/Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp b/Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp
index 406f7205940..633b3ab6a74 100644
--- a/Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp
+++ b/Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp
@@ -38,7 +38,7 @@ Math=true;
decahoriz:=0;
-vardef Test(expr cptk,cptnt)=
+vardef Test(expr cptk)(text cptnt)=
pair Decalage;
if nblignes mod 2=0:
Decalage:=u*((LargeurEcran,-8*(nblignes-1))-6*(length(cptnt)-cptk,0));
@@ -192,9 +192,17 @@ vardef LCD(text nt)(text rep)(expr NB)=
Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1)));
fill Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
draw Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
+ if Calcul:
+ string toto;
+ toto=decimal(rep);
+ for k=0 upto length(toto)-1:
+ Test(k,toto);
+ endfor;
+ else:
for k=0 upto length(rep)-1:
Test(k,rep);
endfor;
+ fi;
enddef;
endinput;
diff --git a/Master/texmf-dist/metapost/profcollege/PfCLabyNombre.mp b/Master/texmf-dist/metapost/profcollege/PfCLabyNombre.mp
index 1ef8c396074..18a4e97931d 100644
--- a/Master/texmf-dist/metapost/profcollege/PfCLabyNombre.mp
+++ b/Master/texmf-dist/metapost/profcollege/PfCLabyNombre.mp
@@ -193,7 +193,47 @@ vardef TraceLabyrinthe=
fi;
);
$
-enddef;
+enddef;
+
+vardef InitialisationLabyrintheMul(expr long,larg)=
+ LargeurLaby:=larg;
+ LongueurLaby:=long;
+ uh=2u;
+ uv=2u;
+ pair M[][],N[][];%centre de la case, coinbg de la case
+ boolean CaseExploree[][];%Case Exploree ou pas
+ %on initialise les cases comme non explorées pour celles qui sont à l'intérieur du labyrinthe
+ for k=-1 upto larg:
+ for l=-1 upto long:
+ M[k][l]:=(5mm,-uv+5mm)+(l*uh,-k*uv);
+ N[k][l]:=(l*uh,(-k-1)*uv);
+ if (k=-1) or (k=larg) or (l=-1) or (l=long):
+ CaseExploree[k][l]:=true;
+ else:
+ CaseExploree[k][l]:=false;
+ fi;
+ endfor;
+ endfor;
+enddef;
+
+vardef TraceLabyrintheMul=
+ save $;
+ picture $;
+ $=image(
+ n:=0;
+ for k=0 upto LargeurLaby-1:
+ for l=0 upto LongueurLaby-1:
+ n:=n+1;
+ if (n mod 2)=1:
+ draw (Fullcircle scaled 10mm) shifted N[k][l];
+ else:
+ draw (unitsquare scaled 10mm) shifted N[k][l];
+ fi;
+ endfor;
+ endfor;
+ );
+ $
+enddef;
vardef murgauche=
save $;
diff --git a/Master/texmf-dist/metapost/profcollege/PfCObjets.mp b/Master/texmf-dist/metapost/profcollege/PfCObjets.mp
index 6998c54e268..0fe551dc9c1 100644
--- a/Master/texmf-dist/metapost/profcollege/PfCObjets.mp
+++ b/Master/texmf-dist/metapost/profcollege/PfCObjets.mp
@@ -18,7 +18,7 @@ boolean creux; creux=false;%pour gérer les solides creux
boolean transformation; transformation=false;%pour gérer les transformations
boolean Ferme[];%pour gérer les faces : si le solide est fermé, toutes les faces non vues ne sont pas intégrées aux calculs
boolean perso[];%pour gérer les gestions personnelles des couleurs
-for k=0 upto 100:
+for k=0 upto 1000:
perso[k]=false;
endfor;
boolean numeroteface;
diff --git a/Master/texmf-dist/metapost/profcollege/PfCSolid.mp b/Master/texmf-dist/metapost/profcollege/PfCSolid.mp
index b5f90b3ae43..765533109d0 100644
--- a/Master/texmf-dist/metapost/profcollege/PfCSolid.mp
+++ b/Master/texmf-dist/metapost/profcollege/PfCSolid.mp
@@ -121,12 +121,13 @@ vardef Projette(expr M)=
elseif typerepre="cabinet":
% (0.5*cosd(30)*Xpart(GCoord(M)),0.75*sind(30)*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
+% (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))*cosd(90-30),Ypart(GCoord(M))*sind(90-30)*0.5)*DE%à garder peut-être ?
+ (Xpart(GCoordcabinet(M)),Ypart(GCoordcabinet(M)))*DE%
+ %(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