summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/metafont/mftoeps/m2esamp/sample1b.mf
blob: 499650af1faf497c88287d2275f4aa162461ea3d (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
27
28
%%%%
%%%% This file belongs to the MFTOEPS package.
%%%%
% ---
% SAMPLE1B.MF
% ---
input polygons; % the definition of the |regular_polygon| function
input mftoeps;
eps_mode_setup;
beginchar(0,2cm#,2cm#,0);
 path P[ ]; % ,,room'' for polygons
 N:=25;     % the number of polygons
% preparing:
 for i:=1 upto N:
  P[i]:=regular_polygon(7)
   scaled ((i/N)**2*w) rotated (i/N*360) shifted (.5w,.5h);
 endfor;
% exporting:
 find_BB for i:=1 upto N-1: P[i], endfor P[N];
 write_preamble jobname;
% Adobe Illustrator likes to control the orientation of paths
 fill_C
  for i:=1 upto N-1:
   if odd(N-i+1): pos_turn else: neg_turn fi P[i],
  endfor pos_turn P[N];
 write_postamble;
endchar;
end.