summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/featpost/example/jdbug.mp
blob: 033fe0248edcb3b27760de534189822bdf4af6e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
% jdbug.mp
% L. Nobre G.
% 2012

prologues := 1;

beginfig(1);
  numeric N, i, u, c, s;
  pen thepen;
  picture lastpic;
  u = 5mm;
  thepen = pencircle scaled 0.2u;
  N = 5;
  s = 180/N;
  c = u*cosd(s);
  draw for i=0 step 2s until 360-2s:
      (u*dir(i))--(c*dir(i+s))--
  endfor cycle withpen thepen;
  lastpic = currentpicture;
endfig;

beginfig(2);
  draw lastpic rotated s;
endfig;

end.