summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex')
-rw-r--r--macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex24
1 files changed, 24 insertions, 0 deletions
diff --git a/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex b/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex
index d000fef45b..117c2a0905 100644
--- a/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex
+++ b/macros/latex/contrib/profcollege/latex/PfCNotionFonction.tex
@@ -463,6 +463,30 @@ x.u:=#2;
else:
draw courbe1(MinX,MaxX,25,Lagrange(x)(#1)) withpen pencircle scaled Epaisseur withcolor CoulTrace;
fi;
+ % Détermination des MinY et MaxY
+% MinY:=Lagrange(MinX)(#1);
+ for k=0 upto 100:
+ if Lagrange(MinX+(k/100)*(MaxX-MinX))(#1)<MinY:
+ MinY:=Lagrange(MinX+(k/100)*(MaxX-MinX))(#1);
+ fi;
+ endfor;
+ %for k=0 upto 100:
+ %if Lagrange(MinX+(k/100)*(MaxX-MinX))(#2)<MinY:
+ %MinY:=Lagrange(MinX+(k/100)*(MaxX-MinX))(#2);
+ %fi;
+ %endfor;
+% MaxY:=Lagrange(MinX)(#1);
+ for k=0 upto 100:
+ if Lagrange(MinX+(k/100)*(MaxX-MinX))(#1)>MaxY:
+ MaxY:=Lagrange(MinX+(k/100)*(MaxX-MinX))(#1);
+ fi;
+ endfor;
+ %for k=0 upto 100:
+ %if Lagrange(MinX+(k/100)*(MaxX-MinX))(#2)>MaxY:
+ %MaxY:=Lagrange(MinX+(k/100)*(MaxX-MinX))(#2);
+ %fi;
+ %endfor;
+ %%%
path cadreexterieur;
cadreexterieur=(((MinX-1)*X.u*cm,(floor(MinY)-1)*Y.u*cm)--((MaxX+1)*X.u*cm,(floor(MinY)-1)*Y.u*cm)--((MaxX+1)*X.u*cm,(floor(MaxY)+1)*Y.u*cm)--((MinX-1)*X.u*cm,(floor(MaxY)+1)*Y.u*cm)--cycle);
clip currentpicture to cadreexterieur;