Documentation : section Objectif plus couleurs
[mp-gdd.git] / exemples / courbes / cp02.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) = sin(2*t+Pi/3) enddef;
18 vardef g(expr t) = sin(3*t) enddef;
19
20 def avecCrayon(expr t,c) = withpen pencircle scaled t withcolor c enddef;
21
22
23
24 beginfig(1);
25
26
27  Repere(8,8,4,4,3,3);
28  Axes; 
29  Debut; 
30   Graduations; Unites(1);
31
32   drawoptions(withcolor LightSlateGrey);
33   trace ((-1,-1)--(-1,1)--(1,1)--(1,-1)--cycle);
34   trace ((-1,-1)--(1,1));
35   trace (1,-1)--(-1,1);
36   trace Cercle(origine,1);
37   trace ((-1,0.5)--(1,0.5));
38   trace ((-1,-0.5)--(1,-0.5));
39   trace ((0.5,-1)--(0.5,1));
40   trace ((-0.5,-1)--(-0.5,1));
41   trace ((-1,sqrt(3)/2)--(1,sqrt(3)/2));
42   trace ((-1,-sqrt(3)/2)--(1,-sqrt(3)/2));
43   trace ((sqrt(3)/2,-1)--(sqrt(3)/2,1));
44   trace ((-sqrt(3)/2,-1)--(-sqrt(3)/2,1));
45
46   trace Courbe(f,g,0,2*Pi,500) avecCrayon(1.5,Orchid);
47
48   pointe Point(0,0);
49
50  Fin;
51
52
53 endfig;
54
55 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.