Une nouvelle série d'exemples : des courbes paramétrées
[mp-gdd.git] / exemples / courbes / cp08.mp
diff --git a/exemples/courbes/cp08.mp b/exemples/courbes/cp08.mp
new file mode 100644 (file)
index 0000000..54b4fd7
--- /dev/null
@@ -0,0 +1,57 @@
+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) = 2*sin(t) enddef;
+vardef g(expr t) = 2*cos(t)*cos(t)/(2-cos(t)) enddef;
+vardef h(expr t) = -t*(1+f(t)) enddef;
+
+def avecCrayon(expr t,c) = withpen pencircle scaled t withcolor c enddef;
+
+def traceDoubleVecteur(expr o,d)= drawdblarrow ((o-d)--(o+d)) gddEnPlace enddef;
+
+path bicorne;
+bicorne = Courbe(f,g,-Pi,Pi,200)--cycle;
+
+
+
+beginfig(1);
+
+
+ Repere(9,6,4.5,1,2,2);
+ Axes; 
+ Debut;
+  Axes;
+  Graduations; Unites(1);
+
+  ColorieAvecTransparence(bicorne,CadetBlue,0.2);
+
+  traceDoubleVecteur((0,2),(0.5,0)) avecCrayon(1,Crimson);
+  traceDoubleVecteur((0,2/3),(0.5,0)) avecCrayon(1,Crimson);
+  trace Vecteur((2,0),(1.6,0.4)) avecCrayon(1,Crimson);
+  trace Vecteur((-2,0),(-1.6,0.4)) avecCrayon(1,Crimson);
+
+  trace bicorne avecCrayon(1.5,CadetBlue);
+
+  pointe Point(0,0);
+  pointe Point(2,0);
+  pointe Point(-2,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.