Debian Codegraph @

texmf-dist/doc/metapost/featpost/example/jdbug.mp

raw
1 % jdbug.mp
2 % L. Nobre G.
3 % 2012
4
5 prologues := 1;
6
7 beginfig(1);
8 numeric N, i, u, c, s;
9 pen thepen;
10 picture lastpic;
11 u = 5mm;
12 thepen = pencircle scaled 0.2u;
13 N = 5;
14 s = 180/N;
15 c = u*cosd(s);
16 draw for i=0 step 2s until 360-2s:
17 (u*dir(i))--(c*dir(i+s))--
18 endfor cycle withpen thepen;
19 lastpic = currentpicture;
20 endfig;
21
22 beginfig(2);
23 draw lastpic rotated s;
24 endfig;
25
26 end.