summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/metapost
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-01-07 21:27:13 +0000
committerKarl Berry <karl@freefriends.org>2024-01-07 21:27:13 +0000
commit20e34a4f89a7ed782e4f3c356e68913db3b4b3c8 (patch)
tree71c2b7176e942ee95808343782ac79d1dbabc5be /Master/texmf-dist/metapost
parent20b51efbc819f03c784d23252578ceedd707e15a (diff)
profcollege (6jan24)
git-svn-id: svn://tug.org/texlive/trunk@69336 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost')
-rw-r--r--Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp28
-rw-r--r--Master/texmf-dist/metapost/profcollege/PfCGeometrie.mp41
2 files changed, 62 insertions, 7 deletions
diff --git a/Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp b/Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp
index 28252f90bf1..c308ec750c2 100644
--- a/Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp
+++ b/Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp
@@ -30,6 +30,9 @@ nblignes:=0;
boolean print;
print:=false;
+color coulprint;
+coulprint=0.8white;
+
color CouleurEcran;
CouleurEcran=(107/255,148/255,107/255);
@@ -177,8 +180,8 @@ vardef LCD(text nt)(text rep)(expr NB)=
nblignes:=nblignes+1;
path Ecran;
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;
+ fill Ecran withcolor if print=true:coulprint else:CouleurEcran fi;
+ draw Ecran withcolor if print=true:coulprint else:CouleurEcran fi;
if length(nt)>0:
for k=0 upto length(nt)-1:
BlocAffichage;
@@ -187,13 +190,13 @@ vardef LCD(text nt)(text rep)(expr NB)=
fi;
for k=1 upto NB:
Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(k+nblignes-1)));
- fill Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
- draw Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
+ fill Ecran withcolor if print=true:coulprint else:CouleurEcran fi;
+ draw Ecran withcolor if print=true:coulprint else:CouleurEcran fi;
endfor;
nblignes:=nblignes+NB+1;
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;
+ fill Ecran withcolor if print=true:coulprint else:CouleurEcran fi;
+ draw Ecran withcolor if print=true:coulprint else:CouleurEcran fi;
if Calcul:
string toto;
toto=decimal(rep);
@@ -207,4 +210,17 @@ vardef LCD(text nt)(text rep)(expr NB)=
fi;
enddef;
+def tand(expr nbang)=sind(nbang)/cosd(nbang)enddef;
+
+vardef arcsind(expr x)=%Définition mathématique en degré
+ angle((sqrt(1-x**2),x))
+enddef;
+
+vardef arccosd(expr x)=%Définition mathématique en degré
+ angle((x,sqrt(1-x**2)))
+enddef;
+
+vardef arctand(expr x)=arcsind(x/(1++x))
+enddef;
+
endinput;
diff --git a/Master/texmf-dist/metapost/profcollege/PfCGeometrie.mp b/Master/texmf-dist/metapost/profcollege/PfCGeometrie.mp
index bada2c141a9..7ec73e648c6 100644
--- a/Master/texmf-dist/metapost/profcollege/PfCGeometrie.mp
+++ b/Master/texmf-dist/metapost/profcollege/PfCGeometrie.mp
@@ -523,6 +523,45 @@ vardef marquedemidroite(expr aa,bb)=
tr
enddef;
+vardef marque_para(expr dd,ee,pa)=
+ save im;
+ picture im;
+ pair kk,ll,mn,mo;
+ kk=point(pa*length dd) of dd;
+ ll=projection(kk,point(0.25*length ee) of ee,point(0.5*length ee) of ee);
+ mn=iso(kk,ll);
+ mo=(mn--kk) intersectionpoint cercles(mn,3mm);
+ im=image(
+ drawarrow mo--kk;
+ drawarrow symetrie(mo,mn)--ll;
+ label(btex // etex,mn);
+ );
+ im
+enddef;
+
+vardef marque_Para(text totem)(expr dd,ee,pa)=
+ save im;
+ picture im;
+ pair kk,ll,mn,mo;
+ kk=point(pa*length dd) of dd;
+ ll=projection(kk,point(0.25*length ee) of ee,point(0.5*length ee) of ee);
+ mn=iso(kk,ll);
+ mo=(mn--kk) intersectionpoint cercles(mn,3mm);
+ im=image(
+ drawarrow (mn{dir(210+angle(mn-mo))}..{dir(150+angle(mn-mo))}kk) cutbefore cercles(mn,3mm);
+ drawarrow symetrie((mn{dir(210+angle(mn-mo))}..{dir(150+angle(mn-mo))}kk) cutbefore cercles(mn,3mm),mn);
+ trace cercles(mn,3mm);
+ for p_=totem:
+ if p_="":
+ label(btex // etex ,mn);
+ else:
+ label(btex ? etex,mn);
+ fi;
+ endfor;
+ );
+ im
+enddef;
+
%------------------------------------------------
% Transformations
%------------------------------------------------
@@ -1349,7 +1388,7 @@ vardef Equerre(expr dte,drte,perpe,sens)=
pair CentreE;
CentreE=CentreCercleI(perpen,ptt,pttt);
$=image(
- fill (perpen--ptt--pttt--cycle) withcolor 0.9*white;
+ fill (perpen--ptt--pttt--cycle) withcolor gris;
draw perpen--ptt--pttt--cycle;
draw codeperp(ptt,perpen,pttt,5);
fill homothetie(polygone(perpen,ptt,pttt),CentreE,0.6) withcolor white;