Documentation : section Objectif plus couleurs
[mp-gdd.git] / exemples / reperes / reperes1.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 labeloffset := 4;
12 gddU:=1.3cm;
13
14
15
16 beginfig(1);
17
18
19   O = Point(0,0);
20   I = Point(1,0);
21   J = Point(0.3,0.8);
22   M = PointDansRepere(5,3,O,I,J);
23   H = PointDansRepere(5,0,O,I,J);
24   K = PointDansRepere(0,3,O,I,J);
25
26   Repere(8,6,1.5,1.5,1,1);
27   Debut;
28
29     trace Droite(O,I);
30     trace Droite(O,J);
31     trace Pt(K)--Pt(M)--Pt(H) dashed evenly;
32
33     marque.urt  "M";
34
35     drawoptions(withpen pencircle scaled 1pt withcolor DodgerBlue);
36     trace Vecteur(O,K);
37     trace Vecteur(O,H);
38     trace Vecteur(O,M);
39     label.top(TEX("\(x\vec\imath\)"),PtR(Milieu(O,H)));
40     label.rt(TEX("\(y\vec\jmath\)"),PtR(Milieu(O,K)));
41
42     drawoptions(withpen pencircle scaled 1.5pt withcolor Crimson);
43     trace Vecteur(O,I);
44     trace Vecteur(O,J);
45
46     drawoptions();
47     marque.llft "O";
48
49     label.bot(TEX("\(x\)"), PtR(H));
50     label.lft(TEX("\(y\)"), PtR(K));
51     label.bot(TEX("\(\vec\imath\)"), PtR(I));
52     label.lft(TEX("\(\vec\jmath\)"), PtR(J));
53
54   Fin;
55
56
57 endfig;
58
59 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.