Mis en place de l'extension showexpl pour les exemples (à la pst) et teste sur un...
[mp-gdd.git] / exemples / divers / epicycloide-const.mp
1 input gdd;
2 input gdd-rep;
3 input gdd-lbl;
4 input gdd-tra;
5 input gdd-fct;
6 input gdd-plt;
7 input gdd-arc;
8 input svgnames;
9
10 lblPreambule := "\usepackage[frenchb]{babel}"       &
11                 "\usepackage[garamond]{mathdesign}" &
12                 "\usepackage{amsmath}";
13
14 labeloffset := 4;
15 gddU:=1.3cm;
16
17 def avecCrayon(expr t,c) = withpen pencircle scaled t withcolor c enddef;
18
19 beginfig(1);
20
21  Repere(10,10,5,4,3,3);
22  Axes; 
23  Debut; 
24   Graduations;
25   Axes;
26   ColorieAvecTransparence(Cercle(origine,1),LightSlateGrey,0.5);
27   trace Cercle(origine,1) avecCrayon(1.5,LightSlateGrey);
28
29   trace Cercle(4/3(cosd(130),sind(130)),1/3);
30
31   drawoptions(withcolor LightSlateGrey);
32   trace Cercle((0,4/3),1/3);
33
34   centre = Point(4/3cosd(130),4/3sind(130));
35   mobile = Point(4/3cosd(130)+1/3cosd(70),4/3sind(130)+1/3sind(70));
36
37   trace (0,0)--Pt(centre)--Pt(mobile) dashed evenly;
38
39   trace Arc(centre,1/3,-5Pi/18,7Pi/18) avecCrayon(1,DodgerBlue);
40   trace Arc(origine,1,Pi/2,13Pi/18) avecCrayon(1,DodgerBlue);
41   fleche Arc(centre,1/6,-5Pi/18,7Pi/18);
42   fleche Arc(origine,1/3,Pi/2,13Pi/18);
43
44   pointe Point(0,4/3);
45   pointe centre;
46   pointe Point(0,0);
47   pointe Point(cosd(130),sind(130));
48
49   gddCouleurPoint := Crimson;
50
51   pointe Point(0,1);
52   pointe mobile;
53
54   drawoptions(withcolor black);
55
56   label.lrt(TEX("\(O\)"),PtR(origine));
57   label.ulft(TEX("\(\Omega(\theta)\)"),PtR(centre));
58   label.urt(TEX("\(M(\theta)\)"),PtR(mobile));
59   label.top(TEX("\(\theta\)"),(1/3cos(11Pi/18),1/3sin(11Pi/18)) gddEnPlace);
60   label.rt(TEX("\(3\theta\)"),PtR(Addition(centre,(1/6,0))));
61   label.bot(TEX("\(N(\theta)\)"),(cos(13Pi/18),sin(13Pi/18)) gddEnPlace);
62  Fin;
63
64 endfig;
65
66 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.