texmf-dist/doc/metapost/mp-geom2d/exemples/divers/polygone.mp
raw| 1 | input geom2d; |
| 2 | |
| 3 | beginfig(1); |
| 4 | |
| 5 | |
| 6 | A = Point(0,0); |
| 7 | B = Point(3,3); |
| 8 | C = Point(3,4); |
| 9 | D = Point(2,2.4); |
| 10 | F = Point(0,5); |
| 11 | G = Barycentre(A,B,C,D,F); |
| 12 | P = Polygone(A,B,C,D,F); |
| 13 | Q1 = PolygoneRegulier(10,2,0,(2,2)); |
| 14 | trace(P); |
| 15 | pointe(G); |
| 16 | trace(Q1); |
| 17 | pointe(PointPolygone(Q1,1)); |
| 18 | pointe(CentrePolygone(Q1)); |
| 19 | endfig; |
| 20 | end |