Debian Codegraph @

texmf-dist/fonts/source/public/recycle/recycle.mf

raw
1 % file recycle.mf, for recycling logo
2 % a quick hack (November 92)
3 %
4 % this code is totally unsupported!
5 %
6 % Ian Green ([email protected])
7 % Mathematical Reasoning Group
8 % Department of AI, University of Edinburgh
9 %
10 % See copyright notice at the end of this file please.
11 %
12 mode_setup;
13 %mode:=smoke;
14 tracingonline :=1;
15
16 def openit = openwindow currentwindow
17 from origin to (screen_rows,screen_cols) at (-50,600)
18 enddef;
19
20 beginchar("A",1in#,1in# *.48/.52,0);
21 interim autorounding:=0; interim smoothing:=0;
22 if odd(w-h): h:=h-1; fi
23 thick := .02*w;
24
25 curve := .05*w; %.07*(h-baseline);
26 ss := .3w; % main thickness of arrow;
27 hs := (8*thick+ss); % distance accorss tips of arrowhead
28
29 forsuffixes $ = a,b,c: transform $;
30 forsuffixes e=l,r: path $e,$'e;endfor endfor;
31
32 penpos.a1(thick,90); penpos.a2(thick,90);
33 penpos.a3(thick,30); penpos.a6(whatever,120);
34
35 penpos.a9(thick,-150); penpos.a10(thick,-150);
36 penpos.a12(thick,-90); penpos.a13(thick,-30); penpos.a14(thick,-30);
37 penpos.a16(thick,60); penpos.a18(thick,150); penpos.a19(whatever,120);
38 penpos.a20(thick,150);
39
40 %top edge
41 y.a1r = h;
42 x.a1 = x.a9r = .5*w;
43 y.a7r = y.a6r;
44 y.a6l = thick+y.a6r = y.a7l;
45
46 pickup pencircle scaled .05pt;
47 z.a9r = z.a19l; % known intersection
48 % define curves at top
49 z.a1 - z.a12 = z.a2 - z.a1;
50 y.a13 = y.a10 = y.a20 = y.a3;
51 z.a2 - z.a12 = z.a3 - z.a10 = z.a20 - z.a13;
52 z.a3 - z.a2 = (curve,0) + ((curve,0)rotated -60);
53 z.a20 - z.a2 =(-curve,0) + ((curve,0)rotated -120);
54 z.a13 - z.a12 = (z.a3 - z.a2) rotated -120;
55
56 %construct an imaginary point to ensure that the fold
57 % is in the correct place. this gives a9
58 z.a20l - z.a9r = (t2,0) rotated 60;
59 z.a10r - z.a9r = (t2,0) rotated 120;
60 z.a20l - z.a17l = (whatever,0) rotated 60;
61
62 %bottom edge, rotation point
63 z21 = (.5w,.5h);
64 z.a6r = (.5[z.a10,z.a3]) + (whatever,0) rotated -60;
65 z.a6r - z21 = (whatever,0) rotated 30;
66
67 y.a16l = y.a6r + (2 * thick);
68
69 z.a13l - z.a15l = (d1,0) rotated 60;
70 z.a13r - z.a15r = (d1-thick,0) rotated 60;
71 z.a17l - z.a15l = (ss,0) rotated -30;
72 z.a17r - z.a15r = (ss-(2 * thick),0) rotated -30;
73 z.a16l = 0.5[z.a17l,z.a15l];
74 z.a9r = whatever[z.a17l,z.a20l];
75 z.a19r - z.a17r = whatever * (z.a19l - z.a17l);
76 z.a4r - z.a8r = (ss,0) rotated 30;
77
78 z.a5r - z.a7r = (hs,0) rotated 30;
79 z.23 = 0.5[z.a5r,z.a7r];
80 z.24 = 0.5[z.a10,z.a3];
81 z.23 = z.24 + (whatever,0) rotated -60;
82
83 z.a8r - z.a9r = (whatever,0) rotated -60;
84 z.a4r - z.a3r = (whatever,0) rotated -60;
85 z.a8l = z.a9l + (whatever,0) rotated -60;
86 z.a4l = z.a3l + (whatever,0) rotated -60;
87
88
89 z.a8r = os[z.a7r, z.a5r];
90 z.a4r = os[z.a5r, z.a7r];
91 z.a5r - z.a4r = (whatever,0) rotated 30;
92
93 % long base of arrow head: known points!
94 z.a6r - z.a5r = (whatever,0) rotated -120;
95
96 z.a4l - z.a8l = (whatever,0) rotated 30;
97 z.a4l - z.a5l = z.a7l - z.a8l;
98 z.a8r - z.a7r = z.a5r - z.a4r;
99 z.a0 = z.a7r + (thick/(sind(30)/cosd(30)),0);
100
101 z.a7l - z.a0 = (whatever,0) rotated 30;
102 z.a5l = z.a7l + whatever * (z.a5r - z.a7r);
103 z.a5l = z.a5r + (thick,0) rotated(60+90) +
104 whatever * (z.a5r - z.a6r);
105
106 fill z.a12l -- z.a1r -- z.a1l -- z.a12r --cycle;
107
108 fill z.a1r --- z.a2r ... z.a3r --- z.a4r -- z.a5r -- z.a6r -- z.a7r
109 -- z.a8r -- z.a9r --- z.a10r ... z.a12r ... z.a13r -- z.a15r
110 -- z.a15r -- z.a17r -- z.a19r
111
112 -- z.a19l -- z.a17l-- z.a15l -- z.a15l --- z.a13l ...
113 z.a12l ... z.a10l --- z.a9l -- z.a8l -- z.a7l
114 -- z.a6l -- z.a5l -- z.a4l -- z.a3l ...
115 z.a2l --- z.a1l -- cycle;
116 % i like this bit
117 b = identity %shifted (0,whatever)
118 rotatedaround (z21,-120);
119 c = identity %shifted (whatever,0)
120 rotatedaround (z21,-240);
121
122 for n = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19:
123 forsuffixes e = l,,r: forsuffixes $ = b,c:
124 z.$[n]e = z.a[n]e transformed $; endfor endfor endfor;
125
126 fill z.b12l -- z.b1r -- z.b1l -- z.b12r --cycle;
127 fill z.b1r --- z.b2r ... z.b3r --- z.b4r -- z.b5r -- z.b6r -- z.b7r
128 -- z.b8r -- z.b9r --- z.b10r ... z.b12r ... z.b13r -- z.b15r
129 -- z.b15r -- z.b17r -- z.b19r
130
131 -- z.b19l -- z.b17l-- z.b15l -- z.b15l --- z.b13l ...
132 z.b12l ... z.b10l --- z.b9l -- z.b8l -- z.b7l
133 -- z.b6l -- z.b5l -- z.b4l -- z.b3l ...
134 z.b2l --- z.b1l -- cycle;
135
136 fill z.c12l -- z.c1r -- z.c1l -- z.c12r --cycle;
137 fill z.c1r --- z.c2r ... z.c3r --- z.c4r -- z.c5r -- z.c6r -- z.c7r
138 -- z.c8r -- z.c9r --- z.c10r ... z.c12r ... z.c13r -- z.c15r
139 -- z.c15r -- z.c17r -- z.c19r
140
141 -- z.c19l -- z.c17l-- z.c15l -- z.c15l --- z.c13l ...
142 z.c12l ... z.c10l --- z.c9l -- z.c8l -- z.c7l
143 -- z.c6l -- z.c5l -- z.c4l -- z.c3l ...
144 z.c2l --- z.c1l -- cycle;
145
146 for n = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23:
147 forsuffixes e = l,,r: forsuffixes $ = a,b,c:
148 labels($[n]e); endfor endfor endfor
149
150 endchar;
151 bye
152 % Copyright (C) 1993 Ian Green
153 %
154 % This program is free software; you can redistribute it and/or modify
155 % it under the terms of the GNU General Public License as published by
156 % the Free Software Foundation; either version 1, or (at your option)
157 % any later version.
158 %
159 % This program is distributed in the hope that it will be useful,
160 % but WITHOUT ANY WARRANTY; without even the implied warranty of
161 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
162 % GNU General Public License for more details.
163 %
164 % You should have received a copy of the GNU General Public License
165 % along with this program; if not, write to the Free Software
166 % Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
167