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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
|
%%
%% This is file `imajdig.mf',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% inslrmaj.dtx (with options: `dig')
%%
%% Copyright 1999 Peter R. Wilson
%%
%% This program is provided under the terms of the
%% LaTeX Project Public License distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt.
%%
%% Author: Peter Wilson (CUA)
%% now at: peter.r.wilson@boeing.com
%%
cmchar "IMAJ digit 1";
beginchar("1", 2sb#+fig_width#, fig_height#, 0);
adjust_fit(0,0);
pcshiftx := sb;
pickup quill;
x1=x2=w/2;
y1=h; bot y2=0;
%%ductus:=true;
if ductus:
pickup stylus;
fi
draw_tstem(1,2,srad);
draw_triserif(1,trijut);
ductus:=false;
penlabels(1,2,100);
endchar; % end "1"
cmchar "IMAJ digit 2";
beginchar("2", 2sb#+fig_width#, fig_height#, 0);
adjust_fit(0,0);
pcshiftx := sb;
pickup quill;
%% stem
lft x1=pcshiftx+o; top y1=h-2thin;
x2=1/2w; top y2= h+o;
rt x3=w-pcshiftx-o; y3=3/4h;
%% foot
lft x5=pcshiftx; bot y5=0;
rt x6=w-pcshiftx; y6=y5;
%%ductus:=true;
if ductus:
pickup stylus;
fi
draw z1..z2{right}..z3{down}..{down}z5; % curve
draw z5--z6; % foot
draw_utriangle(6,thick);
ductus:=false;
penlabels(1,2,3,4,5,6,100);
endchar; % end "2"
cmchar "IMAJ digit 3";
beginchar("3", 2sb#+fig_width#, fig_height#, 0);
adjust_fit(0,0);
pcshiftx := sb;
pickup quill;
%% x values
lft x3=pcshiftx; x10=x3;
rt x5=w-pcshiftx; x8=x5-3thin;
x4=0.5[x3,x5];
x9=0.5[x10,x8];
lft x6=pcshiftx+3thin; x7=x6;
%% y values
bot y3=thin; top y10=h-2thin;
y6=0.5[y3,y10]; y7=y6;
bot y4=-thin; top y9=h+thin;
y5=0.5[y3,y6];
y8=11/12[y7,y10];
%%ductus:=true;
if ductus:
pickup stylus;
fi
draw z3..z4{right}..z5{up}...{-pdir}z6; % bottom bowl
draw z7{pdir}...z8{up}..z9{left}..z10; % top bowl
ductus:=false;
penlabels(1,2,3,4,5,6,7,8,9,10,100);
endchar; % end "3"
cmchar "IMAJ digit 4";
beginchar("4", 2sb#+fig_width#, fig_height#, 0);
adjust_fit(0,0);
pcshiftx := sb;
pickup quill;
%% the stem
x1=x2=w-pcshiftx-jut;
y1=h; bot y2=0;
%% the crossbar
lft x3=pcshiftx; y3=0.33h;
rt x4=w-pcshiftx; y4=y3;
%% the diagonal
lft x5=pcshiftx+jut; y5=h;
x6=x5; y6=y4;
%%ductus:=true;
if ductus:
pickup stylus;
fi
draw_tstem(1,2,srad); % main stem
%%draw_clubbase(1, 2, 1/3, 0, clubjut);
draw z3--z4; % crossbar
draw z3{(1,1)}..{(1,1)}z1; % diagonal
ductus:=false;
penlabels(1,2,3,4,100);
endchar; % end "4"
cmchar "IMAJ digit 5";
beginchar("5", 2sb#+fig_width#, fig_height#, 0);
adjust_fit(0,0);
numeric n[];
pcshiftx := sb;
pickup quill;
%% for the top
rt x1=w-pcshiftx; top y1=h;
lft x2=pcshiftx; y2=y1;
z2'=(lft x2, top y2); z2''=(rt x2, y2');
z0'=(x2', 0); z0''=(x2'', 0);
%% bowl
n1 := w-2pcshiftx+4/3thick; % width of bowl
n2 := 2/3h; % height of bowl
z3=(w-pcshiftx-n1, 0);
obowl(3, n1, n2);
z10o = (z2''--z0'') intersectionpoint subpath (3,4) of obouter;
z10i = (z2'--z0') intersectionpoint subpath (3,4) of obinner;
z10'=(x10i,y10o);
z20o = (z2'--z0') intersectionpoint subpath (2,3) of obouter;
z20i = (z2'--z0') intersectionpoint subpath (2,3) of obinner;
%%ductus:=true;
if ductus:
pickup stylus;
draw z2--z1; draw z2'--z0'; draw z2''--z0'';
draw obouter; draw obinner;
else:
draw z2--z1; % top bar
draw_triangle(1,thick);
fill z2'--z10i--z10o--z2''--cycle; % stem
fill z10o..z3minlo{pdir}..z3maxro{-ppdir}..z3minro{-pdir}..z20o--
z20i..z3minri{pdir}..z3maxri{ppdir}..z3minli{-pdir}..z10i--
z10'--cycle;
fi
ductus:=false;
penlabels(1,2,3,4,5,6,7,100);
endchar; % end "5"
cmchar "IMAJ digit 6";
beginchar("6", 2sb#+fig_width#, fig_height#, 0);
adjust_fit(0,0);
numeric n[];
path pth[];
pcshiftx := sb;
pickup quill;
n1 := w-2pcshiftx; % width of character
n2 := h; % height of character
%% main bowl
z3=(w-pcshiftx-n1,0);
obowl(3, n1, n2);
pth1 := obouter; pth2 := obinner;
z0 = (0,0); z0'=(w,h);
z10o' = (z0--z0') intersectionpoint subpath (0,1) of pth1;
z10i' = (z0--z0') intersectionpoint subpath (0,1) of pth2;
n0 := w-pcshiftx-x10o';
z10o=(x10o'+n0, y10o');
z10i=(x10i'+n0, y10i');
%% bottom bowl
n3 := 16/12n2; % width
n4 := 2/3n2; % height
z13=(w-pcshiftx-n3, 0);
obowl(13, n3, n4);
pth11 := obouter; pth12 := obinner;
z20o = subpath (2,4) of pth2 intersectionpoint
(subpath (3,4) of pth11 & subpath (0,1) of pth11);
z20i = subpath (2,4) of pth2 intersectionpoint
(subpath (3,4) of pth12 & subpath (0,1) of pth12);
%%ductus:=true;
if ductus:
pickup stylus;
draw subpath (2,4) of pth2;
draw (subpath (3,4) of pth11 & subpath (0,1) of pth11);
draw (subpath (3,4) of pth12 & subpath (0,1) of pth12);
else:
fill z10o..z3minlo{-pdir}..z3maxlo{-ppdir}..z3minro{pdir}..
z13maxro{ppdir}..{-pdir}z20o--z20i{pdir}..z13maxri{-ppdir}..
z3minri{-pdir}..z3maxli{ppdir}..z3minli{pdir}..z10i--
cycle;
fi
ductus:=false;
penlabels(1,2,3,4,5,6,8,100);
endchar; % end "6"
cmchar "IMAJ digit 7";
beginchar("7", 2sb#+fig_width#, fig_height#, 0);
adjust_fit(0,0);
pcshiftx := sb;
pickup quill;
%% top bar
lft x1=pcshiftx;
rt x2=w-pcshiftx;
top y1=top y2=h;
x8=pcshiftx+3/8jut; y8=h-0.5thin;
%% bowed leg
x4=w/2; bot y4=0;
x3=0.5[x2,x4]-3thin; y3=0.5[y2,y4];
%%ductus:=true;
if ductus:
pickup stylus;
fi
draw z1--z2; % top bar
draw_triangle(1,thick);
draw z2..z3..z4; % leg
ductus:=false;
penlabels(1,2,3,4,5,6,7,8,100);
endchar; % end "7"
cmchar "IMAJ digit 8";
beginchar("8", 2sb#+fig_width#, fig_height#, 0);
adjust_fit(0,0);
pcshiftx := sb;
numeric alpha; alpha:=1;
pickup quill;
lft x1=alpha*pcshiftx+o; rt x3=w-alpha*pcshiftx-o; y1=y3=3/4h;
x2=x4=w/2; top y2=h+o; bot y4=-o;
x5=x2; y5=h/2+2o;
lft x11=pcshiftx; rt x13=w-pcshiftx; y11=y13=1/4h;
%%ductus:=true;
if ductus:
pickup stylus;
fi
draw z1..z2..z3..z5..z11..z4..z13..z5..cycle;
ductus:=false;
penlabels(1,2,3,4,5,11,13,100);
endchar; % end "8"
cmchar "IMAJ digit 9";
beginchar("9", 2sb#+fig_width#, fig_height#, 0);
adjust_fit(0,0);
numeric n[];
path pth[];
pcshiftx := sb;
pickup quill;
n1 := w-2pcshiftx; % width of character
n2 := h; % height of character
%% main bowl
z3=(w-pcshiftx-n1,0);
obowl(3, n1, n2);
pth1 := obouter; pth2 := obinner;
z0=(0,0); z0'=(w,h);
z20o' = (z0--z0') intersectionpoint subpath (2,3) of pth1;
z20i' = (z0--z0') intersectionpoint subpath (2,3) of pth2;
n0 := x20o'-pcshiftx;
z20o=(x20o'-n0, y20o');
z20i=(x20i'-n0, y20i');
%% bottom bowl
n3 := 16/12n2; % width
n4 := 2/3n2; % height
z13=(pcshiftx,h-n4);
obowl(13, n3, n4);
pth11 := obouter; pth12 := obinner;
z10o = subpath (0,2) of pth2 intersectionpoint subpath (1,3) of pth11;
z10i = subpath (0,2) of pth2 intersectionpoint subpath (1,3) of pth12;
%%ductus:=true;
if ductus:
pickup stylus;
draw subpath (0,2) of pth2;
draw subpath (1,3) of pth11;
draw subpath (1,3) of pth12;
else:
fill z20o..z3minro{pdir}..z3maxro{ppdir}..z3minlo{-pdir}..
z13maxlo{-ppdir}..{pdir}z10o--z10i{-pdir}..z13maxli{ppdir}..
z3minli{pdir}..z3maxri{-ppdir}..z3minri{-pdir}..z20i--
cycle;
fi
ductus:=false;
penlabels(1,2,3,4,5,6,100);
endchar; % end "9"
cmchar "Uncial digit 0";
beginchar("0", 2sb#+fig_width#, fig_height#, 0);
adjust_fit(0,0);
numeric n[];
pcshiftx := sb;
pickup quill;
n1 := w-2pcshiftx; % bowl width
n2 := h+2o; % bowl height
z1=(pcshiftx,-o);
obowl(1, n1, n2);
%%ductus:=true;
if ductus:
pickup stylus;
fi
fill obouter; unfill obinner;
ductus:=false;
%%%proofpcbb(100, y100, y100);
penlabels(1,2,3,4,100);
endchar; % end "0"
|