diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-11 23:49:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-11 23:49:34 +0000 |
commit | 0bf7dc87971bc4f426fb6abdd893a26a6ae65d0b (patch) | |
tree | 4d53bded23dec78efc81b258f039469fa2832271 /Master/texmf-dist/source/metafont/mftoeps/m2esamp/sample3.mf | |
parent | d780c57e68c80655669a3b01af46b9978f5698ef (diff) |
trunk/Master/texmf-dist/source/metafont
git-svn-id: svn://tug.org/texlive/trunk@116 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/metafont/mftoeps/m2esamp/sample3.mf')
-rw-r--r-- | Master/texmf-dist/source/metafont/mftoeps/m2esamp/sample3.mf | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/metafont/mftoeps/m2esamp/sample3.mf b/Master/texmf-dist/source/metafont/mftoeps/m2esamp/sample3.mf new file mode 100644 index 00000000000..c58756e37a6 --- /dev/null +++ b/Master/texmf-dist/source/metafont/mftoeps/m2esamp/sample3.mf @@ -0,0 +1,53 @@ +%%%% +%%%% This file belongs to the MFTOEPS package. +%%%% +% --- +% SAMPLE3.MF +% --- +input mftoeps; +input polygons; +eps_mode_setup; +% unpercent the following line if the coloured version is needed +% coloured:=1; +% --- +def write_paths(expr name) = + find_BB elem_path1; + write_preamble name; + for i:=1 upto objects: + coeff:= + if objects=1: 0 else: .5(1-cosd(((i-1)/(objects-1))[alpha1,alpha2])) fi; + fix_fill_cmyk forsuffixes $:=cyan, magenta, yellow: coeff[$1,$2], endfor + coeff[black1,black2]; + fill_C elem_path[i]; + endfor; + write_postamble; +enddef; +% --- +ch_max:=3; +% --- +for ch:=0 upto ch_max: + beginchar(char(ASCII("a")+ch), 1in#, 1in#, 0); + path elem_path[\\]; + objects:=100; transitions:=3; + sca1:=w; sca2:=.02w; + rot1:=0; rot2:=(ch/ch_max)[25,180]; + skew1:=45; skew2:=0; + alpha1:=0; alpha2:=transitions*360; + if known coloured: + cyan1:=0; magenta1:=0; yellow1:=1; black1:=0; + cyan2:=0.35294; magenta2:=0.8353; yellow2:=0.8353; black2:=0; % brown + else: + cyan1:=0; magenta1:=0; yellow1:=0; black1:=0.7; + cyan2:=0; magenta2:=0; yellow2:=0; black2:=0.15; + fi + for i:=1 upto objects: + coeff:=if objects=1: 0 else: (i-1)/(objects-1) fi; + elem_path[i]:=flex_polygon(5,coeff[skew1,skew2],coeff[skew1,skew2]) + scaled (coeff[sca1,sca2]) + rotated (coeff[rot1,rot2]) shifted (.5w,.5h); + endfor + write_paths(jobname & char(ASCII("a")+ch)); + endchar; +endfor +% --- +end. |