Mis en place de l'extension showexpl pour les exemples (à la pst) et teste sur un...
[mp-gdd.git] / exemples / courbes / cp08.mp
1 input gdd;
2 input gdd-rep;
3 input gdd-lbl;
4 input gdd-tra;
5 input svgnames;
6
7 lblPreambule := "\usepackage[frenchb]{babel}"       &
8                 "\usepackage[garamond]{mathdesign}" &
9                 "\usepackage{amsmath}";
10
11 input gdd-fct;
12 input gdd-plt;
13
14 labeloffset := 6;
15 gddU:=1.2cm;
16
17 vardef f(expr t) = 2*sin(t) enddef;
18 vardef g(expr t) = 2*cos(t)*cos(t)/(2-cos(t)) enddef;
19 vardef h(expr t) = -t*(1+f(t)) enddef;
20
21 def avecCrayon(expr t,c) = withpen pencircle scaled t withcolor c enddef;
22
23 def traceDoubleVecteur(expr o,d)= drawdblarrow ((o-d)--(o+d)) gddEnPlace enddef;
24
25 path bicorne;
26 bicorne = Courbe(f,g,-Pi,Pi,200)--cycle;
27
28
29
30 beginfig(1);
31
32
33  Repere(9,6,4.5,1,2,2);
34  Axes; 
35  Debut;
36   Axes;
37   Graduations; Unites(1);
38
39   ColorieAvecTransparence(bicorne,CadetBlue,0.2);
40
41   traceDoubleVecteur((0,2),(0.5,0)) avecCrayon(1,Crimson);
42   traceDoubleVecteur((0,2/3),(0.5,0)) avecCrayon(1,Crimson);
43   trace Vecteur((2,0),(1.6,0.4)) avecCrayon(1,Crimson);
44   trace Vecteur((-2,0),(-1.6,0.4)) avecCrayon(1,Crimson);
45
46   trace bicorne avecCrayon(1.5,CadetBlue);
47
48   pointe Point(0,0);
49   pointe Point(2,0);
50   pointe Point(-2,0);
51
52  Fin;
53
54
55 endfig;
56
57 end

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.