Une nouvelle série d'exemples : des courbes paramétrées
[mp-gdd.git] / exemples / courbes / cp05.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) = t*t-2*t enddef;
18 vardef g(expr t) = t*t + 1/(t*t) enddef;
19 vardef fp(expr t) = 2*t+t*t enddef;
20 vardef gp(expr t) = t*t enddef;
21
22 def avecCrayon(expr t,c) = withpen pencircle scaled t withcolor c enddef;
23
24
25
26 beginfig(1);
27
28
29  Repere(10,10,2,1,1,1);
30  Axes; 
31  Debut; 
32   Graduations; Unites(1);
33
34   drawoptions(withcolor LightSlateGrey);
35   trace (3,0)--(3,2)--(-1,2)--(-1,0) dashed evenly;
36   trace (1,0)--(1,6)--(0,6) dashed evenly;
37   trace Courbe(fp,gp,-5,5,500);
38
39   trace Vecteur((-1,2),(-1,2)+(0.5,2)) avecCrayon(1,Crimson);
40   trace Vecteur((3,2),(4,2)) avecCrayon(1,Crimson);
41   trace Vecteur((3,2),(2,2)) avecCrayon(1,Crimson);
42
43   trace Courbe(f,g,-10,-0.05,300) avecCrayon(1.5,DarkGoldenrod);
44   trace Courbe(f,g,0.05,10,300) avecCrayon(1.5,DarkGoldenrod);
45
46   pointe Point(0,0);
47   pointe Point(-1,2);
48   pointe Point(3,2);
49   pointe Point(1,6);
50
51  Fin;
52
53
54 endfig;
55
56 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.