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
301
302
303
|
% The Computer Modern Symbols family (by D. E. Knuth, 1979--1985)
font_coding_scheme:="TeX math symbols";
mode_setup; font_setup;
autorounding:=0;
font_slant slant; font_x_height x_height#;
font_quad 18u# if not monospace:+4letter_fit# fi;
% (The spacing is zero so that \TeX\ will always add the italic correction.)
% (The calling file should give the other math symbol font parameters.)
slant:=mono_charic#:=0; % the remaining characters will not be slanted
currenttransform:=identity yscaled aspect_ratio scaled granularity;
% The Sun symbol
cmchar "Sun symbol (S)";
beginarithchar("S"); pickup light_rule.nib; autorounded;
lft x6=hround u; x2=w-x6; y8=x2-x6; y2=.5y8;
circle_points; draw_circle; % circle
fill fullcircle scaled(1.1dot_size+eps) shifted(.5[z4,z8]); % dot
labels(1,2,3,4,5,6,7,8); endchar;
% The Mercury symbol
cmchar "Mercury symbol (1)";
beginchar("1",11u#,6u#+math_axis#,6u#-math_axis#);
italcorr math_axis#*slant-.5u#;
adjust_fit(0,0);
pickup light_rule.nib; autorounded;
lft x6=hround u; x2=w-x6; bot y2=2.25u+.5(x2-x6); y8-y2=.5(x2-x6);
circle_points; draw_circle;
% now for the cross underneath
x9=x4; y9=-2.25u; x10=x4-2.25u; x11=x4+2.25u; y10=y11=0;
draw z4--z9; draw z10--z11;
% now for the horns
z0 = .5[z6,z2]; % center of the circle
z12 = z0 + (z8-z0) rotated 30;
z14 = z0 + (z8-z0) rotated -30;
bot y13 = bot y15 = top y8 + (y8-y12);
rt x13 = 0.5(x6+x7); x15 = w-x13;
draw z12{left}..{z7-z4}z13;
draw z14{right}..{z1-z4}z15;
labels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); endchar;
% The Venus (female) symbol
cmchar "Venus symbol (2)";
beginchar("2",12u#,6u#+math_axis#,6u#-math_axis#);
italcorr math_axis#*slant-.5u#;
adjust_fit(0,0);
pickup light_rule.nib; autorounded;
lft x6=hround u; x2=w-x6; bot y2=2.5u+.5(x2-x6); y8-y2=.5(x2-x6);
circle_points; draw_circle; % 10u in diameter
% now for the cross underneath
x9=x4; y9=-2.5u; x10=x4-2.5u; x11=x4+2.5u; y10=y11=0;
draw z4--z9; draw z10--z11;
labels(1,2,3,4,5,6,7,8,9,10,11); endchar;
% The Earth symbol
cmchar "Earth symbol (3)";
beginarithchar("3"); pickup light_rule.nib; autorounded;
lft x6=hround u; x2=w-x6; y8=x2-x6; y2=.5y8;
circle_points; draw_circle; % circle
draw z2--z6; draw z4--z8; % bar and stem
labels(1,2,3,4,5,6,7,8); endchar;
% The Mars (male) symbol
cmchar "Mars symbol (4)";
beginchar("4",12u#,6u#+math_axis#,6u#-math_axis#);
italcorr 2u#;
adjust_fit(0,0);
pickup light_rule.nib; autorounded;
lft x6=hround u; x2=w-x6; y8=x2-x6; y2=.5y8;
circle_points; draw_circle; % circle
% now for the arrow
z0 = .5[z6,z2]; % center of the circle
z9 = 2[z0,z1];
y10 = y9; x11 = x9;
lft x10 = x1; bot y11 = y1;
draw z1--z9; draw z9--z10; draw z9--z11;
labels(1,2,3,4,5,6,7,8,9,10,11); endchar;
% The Jupiter symbol
cmchar "Jupiter symbol (5)";
beginchar("5",13u#,6u#+math_axis#,6u#-math_axis#);
adjust_fit(0,0);
pickup light_rule.nib; autorounded;
penpos1(cap_hair,90); penpos2(.4cap_curve,90);
penpos3(.8cap_curve,0); penpos4(cap_hair,0);
penpos5(1.414214cap_hair,45); penpos6(cap_hair,90);
penpos7(1.1cap_hair,0); penpos8(1.1cap_hair,0);
x1=hround u; y1r=0.5(asc_height+x_height);
x2=5u; top y2=vround asc_height;
x3 = 8u; y3=x_height;
x5l=hround 2u; y5l=0;
z4l=z5r;
x5r := x4r; y5r := y4r; % redefine so we can leave out z4
y6l=y5l; x6l=w-x1;
x7r=x6; y7=x_height;
x8=x3; y8=-desc_depth;
penstroke z1e..z2e{right}..z3e{down}..{z5l-z4l}z5e--z6e;
penstroke z7e--z8e;
penlabels(1,2,3,4,5,6,7,8); endchar;
% The Saturn symbol
cmchar "Saturn symbol (6)";
beginchar("6",11u#,asc_height#,0);
italcorr .5[bar_height#,x_height#]*slant-serif_fit#+.5stem#-2u#;
adjust_fit(serif_fit#+stem_shift#,serif_fit#-stem_shift#);
pickup tiny.nib; pos1(stem,0); pos2(stem,0);
pos3(stem,90); pos4(cap_hair,90); pos5(stem,0);
pos6(0.75stem,0); pos7(cap_hair,45);
lft x1l=hround(2.5u-.5stem); x1l=x2l;
top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % left stem
if serifs: nodish_serif(1,2,a,1/3,jut,b,1/3,jut); fi % upper serif
x3=x2r; y3=y5=math_axis;
x5=w-x1;
x4=0.5(x3r+x5r); y4=x_height;
x6r=x5l; y6=vround u;
rt x7r = hround(w-u); y7r=-0.5desc_depth;
filldraw stroke z3e{up}..z4e{right}..z5e{down}..z6e{down}..z7e;
penlabels(1,2,3,4,5,6,7); endchar;
% The Uranus symbol
cmchar "Uranus symbol (7)";
beginchar("7",10u#,6u#+math_axis#,6u#-math_axis#);
italcorr math_axis#*slant-.5u#;
adjust_fit(0,0);
pickup light_rule.nib; autorounded;
lft x6=hround u; x2=w-x6; bot y2=.5(x2-x6); y8-y2=.5(x2-x6);
circle_points; draw_circle; % 8u in diameter
z0 = .5[z4,z8];
fill fullcircle scaled(.8dot_size+eps) shifted z0; % dot
% now for the arrow on top
z9 = 2[z0,z8]; y10=y11 = .5(y8+y9); x10-x8 = x8-x11 = .5(y9-y8);
draw z8--z9; draw z9--z10; draw z9--z11;
labels(1,2,3,4,5,6,7,8,9,10,11); endchar;
% The Neptune symbol
cmchar "Neptune symbol (8)";
beginchar("8",14u#,6u#+math_axis#,6u#-math_axis#);
italcorr math_axis#*slant-.5u#;
adjust_fit(0,0);
pickup light_rule.nib; autorounded;
lft x6=hround 2u; x2=w-x6; bot y2=2.5u+.5(x2-x6); y8-y2=.5(x2-x6);
circle_points;
draw z6{down}..z5{z4-z6}..z4{right}..z3{z2-z4}..{up}z2; % semicircle
% now for the cross underneath
x9=x4; y9=-2.5u; x10=x4-3.5u; x11=x4+3.5u; y10=y11=0;
draw z4--z9; draw z10--z11;
% and the three arrows
x12=x6; x13=x4; x14=x2; y12=y13=y14=y7; % tips of arrows
y15=y16=y17=y18=y19=y20=y7-1u;
x15=x12-1u; x16=x12+1u; x17=x13-1u; x18=x13+1u; x19=x14-1u; x20=x14+1u;
draw z6--z12; draw z4--z13; draw z2--z14;
draw z12--z15; draw z12--z16;
draw z13--z17; draw z13--z18;
draw z14--z19; draw z14--z20;
labels(2,3,4,5,6,9,10,11,12,13,14,17,18); endchar;
% The Pluto symbol
cmchar "Pluto symbol (9)";
beginchar("9",12u#,cap_height#,0);
adjust_fit(cap_serif_fit#,-1u#);
pickup tiny.nib; pos1(cap_stem,0); pos2(cap_stem,0);
lft x1l=lft x2l=hround max(2u,3u-.5cap_stem); top y1=h; bot y2=0;
filldraw stroke z1e--z2e; % stem
pickup crisp.nib; pos8(slab,-90); pos9(hair,0);
bot y8r=0; x8=x2; y9=y8l+beak+eps; rt x9r=hround(w-.75u);
arm(8,9,e,1.2beak_darkness,beak_jut); % lower arm and beak (of L)
if serifs: nodish_serif(1,2,a,1/3,cap_jut,b,1/3,.5cap_jut); % upper serif
nodish_serif(2,1,c,1/3,cap_jut,d,1/3,.5cap_jut); fi % lower serif
penpos3(cap_band,90); penpos4(cap_band,90);
penpos5(cap_curve if hefty:-3stem_corr fi,0);
penpos6(.5[vair,cap_band],-90); penpos7(.5[vair,cap_band],-90);
z3r=top z1; y4=y3; y5=.5[y4l,y6l]; y6=y7;
x7=x2; y7l=vround .5h; x4=x6=.5w+.75u; x5r=hround(w-u);
x4l:=x6l:=x4-.25cap_curve;
fill stroke z3e..pulled_arc.e(4,5) & pulled_arc.e(5,6)..z7e; % lobe
math_fit(0,u#); penlabels(1,2,3,4,5,6,7,8,9); endchar;
% The crescent moon symbol. We have to be careful here because this
% is to be half width (7u instead of 14u) -- so don't use beginarithchar!
cmchar "Moon symbol (M)";
beginchar("M",7u#,6u#+math_axis#,6u#-math_axis#);
italcorr math_axis#*slant-.5u#;
adjust_fit(0,1u#); % add back the 1u# of space that SHOULD be at the right
pickup light_rule.nib; autorounded;
lft x6=hround u; x2=2w-x6; y8=x2-x6; y2=.5y8;
circle_points;
% "limb" is a semicircle drawn directly
draw z8{left}..z7{z6-z8}..z6{down}..z5{z4-z6}..{right}z4;
% "terminator" is halfway between limb and vertical line
z9 = .25[z7,z1]; z10 = .25[z6,z2]; z11 = .25[z5,z3];
draw z8{left}..z9..z10{down}..z11..{right}z4;
labels(1,2,3,4,5,6,7,8,9,10,11); endchar;
% The ascending node symbol ("dragon's head")
cmchar "Ascending node symbol (N)";
beginchar("N",14u#,cap_height#,0);
adjust_fit(0,0);
pickup light_rule.nib; autorounded;
numeric diameter, rad;
diameter = 3u; rad = 1/2diameter;
lft x1 = 1u+rad; x5 = w - x1; top y1 = top y5 = rad;
z2 = z1 + (rad,0) rotated 30;
z4 = z5 + (rad,0) rotated 150;
x3 = 1/2(x1+x5); top y3 = h;
penpos3(.75cap_curve,-90); penpos2(.86cap_hair,30);
penpos4(.86cap_hair,-210);
draw fullcircle scaled diameter shifted z1;
draw fullcircle scaled diameter shifted z5;
penstroke z2e{(z2-z1) rotated 90}..z3e{right}..{(z4-z5) rotated 90}z4e;
penlabels(1,2,3,4,5); endchar;
% The descending node symbol ("dragon's tail")
cmchar "Descending node symbol (D)";
beginchar("D",14u#,cap_height#,0);
adjust_fit(0,0);
pickup light_rule.nib; autorounded;
numeric diameter, rad;
diameter = 3u; rad = 1/2diameter;
lft x1 = 1u+rad; x5 = w - x1; bot y1 = bot y5 = h - rad;
z2 = z1 + (rad,0) rotated -30;
z4 = z5 + (rad,0) rotated -150;
x3 = 1/2(x1+x5); bot y3 = 0;
penpos3(.75cap_curve,-90); penpos2(.86cap_hair,150);
penpos4(.86cap_hair,30);
draw fullcircle scaled diameter shifted z1;
draw fullcircle scaled diameter shifted z5;
penstroke z2e{(z2-z1) rotated -90}..z3e{right}..{(z4-z5) rotated -90}z4e;
penlabels(1,2,3,4,5); endchar;
% The vernal equinox symbol (Aries or ram's horn)
cmchar "Vernal Equinox (V)";
beginchar("V",14u#,cap_height#,0);
italcorr .8cap_height#*slant-.5u#;
adjust_fit(0,0);
pickup tiny.nib; pos1(.75cap_stem,0); pos2(.75cap_stem,0);
lft x1l=lft x2l=hround(.5w-.375cap_stem); y1=.5h; bot y2=0;
filldraw stroke z1e--z2e; % stem
penpos3(.45cap_stem,0); penpos4(.6cap_curve,90);
penpos5(.4cap_curve,180); penpos6(cap_hair,270);
z3l=lft z1l; x5r=hround u; y5=bot .8h; x4=x6=.61803[x3l,x5l]; y4r=h+o;
y5-y6=y4l-y5;
penstroke z3e{up}..z4e{left}..z5e{down}..{right}z6e; % left arc
%fill z3r{up}...z4r{left}...{down}diag_end(5'r,5r,1,1,5l,5'l){up}
% ...{right}z4l...{down}z3l--cycle; % left arc
penpos7(.45cap_stem,0); penpos8(.6cap_curve,-90);
penpos9(.4cap_curve,-180); penpos10(cap_hair,-270);
z7r=rt z1r; x9=w-x5; y9=y5; x8=w-x4; y8=y4;
x10=w-x6; y10=y6;
penstroke z7e{up}..z8e{right}..z9e{down}..{left}z10e; % right arc
%fill z6r{up}...z7r{right}...{down}diag_end(8'r,8r,1,1,8l,8'l){up}
% ...{left}z7l...{down}z6l--cycle; % right arc
math_fit(-.8cap_height#*slant-.5u#,ic#-2.5u#);
penlabels(1,2,3,4,5,6,7,8,9,10); endchar;
% The autumnal equinox symbol (Libra or scales)
cmchar "Autumnal Equinox (L)";
compute_spread(.45x_height#,.55x_height#);
beginchar("L",14u#,v_center(2spread#+rule_thickness#));
italcorr h#*slant-.5u#;
adjust_fit(0,0); pickup rule.nib;
numeric diameter;
lft x1=hround u; x3=x1; x2=x7=w-x1; x5=.5(x3+x7);
x4=.5(x3+x5); x6=.5(x5+x7);
y1=y2; y3=y4=y5=y6=y7=math_axis; y3-y1=spread;
draw z1--z2; % lower bar
draw z3--z4; % left of top bar
draw z6--z7; % right of top bar
diameter = x6-x4;
draw halfcircle scaled diameter shifted (x5,y5); % semicircle at top
labels(1,2,3,4,5,6,7); endchar;
% small circle, refined from symbol.cm---guaranteed to be circular!
cmchar "Circle operator";
beginchar(oct"016",9u#,v_center(7u#));
adjust_fit(0,0); pickup rule.nib; autorounded;
lft x6=hround u; x2=w-x6; y2=math_axis; y8-y2=.5(x2-x6);
circle_points; draw_circle; % circle
labels(1,2,3,4,5,6,7,8); endchar;
bye.
|