Documentation : section Objectif plus couleurs
[mp-gdd.git] / exemples / courbes / cp07.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/sqrt(1+t*t) enddef;
18 vardef g(expr t) = t*(1+f(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
24
25 beginfig(1);
26
27
28  Repere(6,10,3,5,2,2);
29  Axes; 
30  Debut; 
31   Graduations; Unites(1);
32
33   trace Droite((1,-2),(1,2)) withcolor MidnightBlue;
34
35   trace (-1,0)..Courbe(f,g,-18,18,200) avecCrayon(1.5,DarkSalmon);
36   trace (-1,0)..Courbe(f,h,-18,18,200) avecCrayon(1.5,DarkSalmon);
37
38   pointe Point(0,0);
39
40  Fin;
41
42
43 endfig;
44
45 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.