Une nouvelle série d'exemples : des courbes paramétrées
[mp-gdd.git] / exemples / courbes / cp07.mp
diff --git a/exemples/courbes/cp07.mp b/exemples/courbes/cp07.mp
new file mode 100644 (file)
index 0000000..582d1b4
--- /dev/null
@@ -0,0 +1,45 @@
+input gdd;
+input gdd-rep;
+input gdd-lbl;
+input gdd-tra;
+input svgnames;
+
+lblPreambule := "\usepackage[frenchb]{babel}"       &
+                "\usepackage[garamond]{mathdesign}" &
+                "\usepackage{amsmath}";
+
+input gdd-fct;
+input gdd-plt;
+
+labeloffset := 6;
+gddU:=1.2cm;
+
+vardef f(expr t) = t/sqrt(1+t*t) enddef;
+vardef g(expr t) = t*(1+f(t)) enddef;
+vardef h(expr t) = -t*(1+f(t)) enddef;
+
+def avecCrayon(expr t,c) = withpen pencircle scaled t withcolor c enddef;
+
+
+
+beginfig(1);
+
+
+ Repere(6,10,3,5,2,2);
+ Axes; 
+ Debut; 
+  Graduations; Unites(1);
+
+  trace Droite((1,-2),(1,2)) withcolor MidnightBlue;
+
+  trace (-1,0)..Courbe(f,g,-18,18,200) avecCrayon(1.5,DarkSalmon);
+  trace (-1,0)..Courbe(f,h,-18,18,200) avecCrayon(1.5,DarkSalmon);
+
+  pointe Point(0,0);
+
+ 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.