De nouveaux exemples : représentations de fonctions
[mp-gdd.git] / exemples / fonctions / fonction1.mp
diff --git a/exemples/fonctions/fonction1.mp b/exemples/fonctions/fonction1.mp
new file mode 100644 (file)
index 0000000..72a6fad
--- /dev/null
@@ -0,0 +1,42 @@
+input gdd;
+input gdd-rep;
+input gdd-lbl;
+input gdd-tra;
+input svgnames;
+
+lblPreambule := "\usepackage[frenchb]{babel}"        &
+                "\usepackage[garamond]{mathdesign}"  &
+                "\usepackage{amsmath}\usepackage{mflogo}";
+
+input gdd-fct;
+input gdd-plt;
+
+labeloffset := 6;
+gddU:=1.2cm;
+
+vardef f(expr x) = sqrt(x+3-4*sqrt(x-1))+sqrt(x+8-6*sqrt(x-1)) enddef;
+
+def avecCrayon(expr t,c) = withpen pencircle scaled t withcolor c enddef;
+
+
+
+beginfig(1);
+
+Repere(10,6,1,2,.8,0.8);
+ Axes; 
+ Debut; 
+  Graduations; Unites(1);
+
+  trace Representation(f,1,12,100) avecCrayon(1.5,Indigo);
+
+  pointe Point(5,1);
+  pointe Point(10,1);
+
+  label.top(TEX("\(y=\sqrt{x+3-4\sqrt{x-1}}+\sqrt{x+8-6\sqrt{x-1}}\)"),
+     (7,2.5) gddEnPlace) withcolor Olive;
+ Fin;
+
+
+endfig;
+
+end
\ No newline at end of file

Licence Creative Commons Les fichiers de Syracuse sont mis à disposition (sauf mention contraire) selon les termes de la
Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International.