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
|
def sideonetop =
z0 = (0w,.5h);
penpos0(croswid, a4);
z1 = z0;
penpos1(knotwid, a4);
z2 = (.25w,.75h);
penpos2(knotwid, a4);
z3 = (.75w,.75h);
penpos3(knotwid, a3);
z4 = z6r;
penpos4(knotwid, a3);
z5 = (w,.5h);
penpos5(croswid, a2);
z6 = z5;
penpos6(knotwid, a2);
z7 = (.75w,.25h);
penpos7(knotwid, a2);
z8 = (.75w,0h);
penpos8(knotwid, a2);
z9 = (.25w,0h);
penpos9(knotwid, a1);
z10 = (.25w,.25h);
penpos10(knotwid, a1);
z11 = z0r;
penpos11(knotwid, a1);
llrrexp(11);
penstroke z1e---z2e---z3e---z4e;
penstroke z6e---z7e{down}---z8e;
penstroke z9e---{up}z10e---z11e;
enddef;
def sideonebot =
z0 = (1w,.5h);
penpos0(croswid, a2);
z1 = z0;
penpos1(knotwid, a2);
z2 = (.75w,.25h);
penpos2(knotwid, a2);
z3 = (.25w,.25h);
penpos3(knotwid, a1);
z4 = z6r;
penpos4(knotwid, a1);
z5 = (0w,.5h);
penpos5(croswid, a4);
z6 = z5;
penpos6(knotwid, a4);
z7 = (.25w,.75h);
penpos7(knotwid, a4);
z8 = (.25w,1h);
penpos8(knotwid, a1);
z9 = (.75w,1h);
penpos9(knotwid, a2);
z10 = (.75w,.75h);
penpos10(knotwid, a3);
z11 = z0r;
penpos11(knotwid, a3);
llrrexp(11);
penstroke z1e---z2e---z3e---z4e;
penstroke z6e---z7e{up}---z8e;
penstroke z9e---{down}z10e---z11e;
enddef;
beginchar ("`", sqwid#, sqht#, 0); "sideone top";
sideonetop;
endchar;
beginchar ("a", sqwid#, sqht#, 0); "sideone bot";
sideonebot;
endchar;
beginchar ("b", sqwid#, sqht#, 0); "sideone left";
sideonetop;
currentpicture := currentpicture rotated 90 shifted (w, 0);
endchar;
beginchar ("c", sqwid#, sqht#, 0); "sideone right";
sideonebot;
currentpicture := currentpicture rotated 90 shifted (w, 0);
endchar;
def sidetwotop =
z0 = (0w,.5h);
penpos0(croswid, a4);
z1 = z0;
penpos1(knotwid, a4);
z2 = z3r;
penpos2(knotwid, a4);
z3 = (.5w,1h);
penpos3(croswid, a3);
z4 = z3;
penpos4(knotwid, a3);
z5 = z6r;
penpos5(knotwid, a3);
z6 = (1w,.5h);
penpos6(croswid, a2);
z7 = z6;
penpos7(knotwid, a2);
z8 = (.75w,.25h);
penpos8(knotwid, a2);
z9 = (.75w,0h);
penpos9(knotwid, a2);
z10 = (.25w,0h);
penpos10(knotwid, a1);
z11 = (.25w,.25h);
penpos11(knotwid, a1);
z12 = z0r;
penpos12(knotwid, a1);
llrrexp(12);
penstroke z1e---z2e;
penstroke z4e---z5e;
penstroke z7e---z8e{down}---z9e;
penstroke z10e---{up}z11e---z12e;
enddef;
def sidetwobot =
z0 = (1w,.5h);
penpos0(croswid, a2);
z1 = z0;
penpos1(knotwid, a2);
z2 = z3r;
penpos2(knotwid, a2);
z3 = (.5w,0h);
penpos3(croswid, a1);
z4 = z3;
penpos4(knotwid, a1);
z5 = z6r;
penpos5(knotwid, a1);
z6 = (0w,.5h);
penpos6(croswid, a4);
z7 = z6;
penpos7(knotwid, a4);
z8 = (.25w,.75h);
penpos8(knotwid, a4);
z9 = (.25w,1h);
penpos9(knotwid, a1);
z10 = (.75w,1h);
penpos10(knotwid, a2);
z11 = (.75w,.75h);
penpos11(knotwid, a3);
z12 = z0r;
penpos12(knotwid, a3);
llrrexp(12);
penstroke z1e---z2e;
penstroke z4e---z5e;
penstroke z7e---z8e{up}---z9e;
penstroke z10e---{down}z11e---z12e;
enddef;
beginchar ("d", sqwid#, sqht#, 0); "sidetwo top";
sidetwotop;
endchar;
beginchar ("e", sqwid#, sqht#, 0); "sidetwo bot";
sidetwobot;
endchar;
beginchar ("f", sqwid#, sqht#, 0); "sidetwo left";
sidetwotop;
currentpicture := currentpicture rotated 90 shifted (w, 0);
endchar;
beginchar ("g", sqwid#, sqht#, 0); "sidetwo right";
sidetwobot;
currentpicture := currentpicture rotated 90 shifted (w, 0);
endchar;
def sidehoriz =
z1 = (.25w, h);
penpos1(knotwid, 3);
z2 = (.25w, 0h);
penpos2(knotwid, 3);
z3 = (.75w, h);
penpos3(knotwid, 2);
z4 = (.75w, 0h);
penpos4(knotwid, 2);
llrrexp(4);
penstroke z1e---z2e;
penstroke z3e---z4e;
enddef;
beginchar ("h", sqwid#, sqht#, 0); "horizontal side";
sidehoriz;
currentpicture := currentpicture rotated 90 shifted (w, 0);
endchar;
beginchar ("i", sqwid#, sqht#, 0); "verticle side";
sidehoriz;
currentpicture := currentpicture rotated 90 shifted (w, 0);
endchar;
|