Documentation : section Objectif plus couleurs
[mp-gdd.git] / exemples / courbes / cp06.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) = 1/t + 1/(t+1) enddef;
18 vardef g(expr t) = 1/t + 1/(1+2*t+t**2) enddef;
19 vardef p(expr x) = x*(x+2)+2 enddef;
20
21 def avecCrayon(expr t,c) = withpen pencircle scaled t withcolor c enddef;
22
23
24
25 beginfig(1);
26
27
28  Repere(10,10,5,5,1,1);
29  Axes; 
30  Debut; 
31   Graduations; Unites(1);
32
33   drawoptions(withcolor LightSlateGrey);
34   trace Droite(origine,Point(1,1));
35   trace Representation(p,-3,1,20);
36
37   trace Courbe(f,g,-20,-1.1,300) avecCrayon(1.5,Teal);
38   trace Courbe(f,g,-0.9,-0.1,300) avecCrayon(1.5,Teal);
39   trace Courbe(f,g,0.1,20,300) avecCrayon(1.5,Teal);
40
41   pointe Point(0,0);
42   pointe Point(-1,0);
43   pointe Point(-0.526,-0.140);
44
45  Fin;
46
47
48 endfig;
49
50 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.