diff options
Diffstat (limited to 'Master/texmf-dist/metapost')
-rw-r--r-- | Master/texmf-dist/metapost/profcollege/PfCCalculatrice.mp | 28 | ||||
-rw-r--r-- | Master/texmf-dist/metapost/profcollege/PfCGeometrie.mp | 41 |
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; |