Debian Codegraph @

texmf-dist/doc/metapost/mp-geom2d/exemples/cercles/cercles3.mp

raw
1 input geom2d;
2
3 labeloffset := 6;
4
5 gddTaillePoint := 2;
6 gddCouleurPoint := Yellow;
7
8
9
10 beginfig(1);
11
12
13 C1 = Cercle((1,1),3);
14 C2 = Cercle((-3,-3),1);
15
16 T1 = TangenteCommuneExterieure(C1,C2);
17 T2 = TangenteCommuneExterieure(C2,C1);
18 T3 = TangenteCommuneInterieure(C1,C2);
19 T4 = TangenteCommuneInterieure(C2,C1);
20
21
22 drawoptions(withcolor LightSlateGrey);
23 trace C1;
24 trace C2;
25
26 drawoptions(withcolor Olive);
27 trace T1;
28 trace T2;
29
30
31 drawoptions(withcolor DarkRed);
32 trace T3;
33 trace T4;
34
35 drawoptions();
36 pointe Centre(C1);
37 pointe Centre(C2);
38
39 a = angle((0,-1));
40 show a;
41
42 endfig;
43
44 beginfig(2);
45
46 A = Point(0,0);
47 B = Point(2,1);
48 C = Point(1,3);
49
50 K = CercleTroisPoints(A,B,C);
51
52 trace K;
53 pointe A;
54 pointe B;
55 pointe C;
56 endfig;
57
58 end