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
|
def soloman_corner =
z0 = (w,.5h);
penpos0(croswid, a2);
z1 = z0;
penpos1(knotwid, a2);
z2 = (.75w,.25h);
penpos2(knotwid, a2);
z3 = (.25w,.25h);
penpos3(knotwid, a1);
z4 = (.25w,.75h);
penpos4(knotwid, a4);
z5 = z6r;
penpos5(knotwid, a4);
z6 = (.5w,h);
penpos6(croswid, a3);
z7 = z6;
penpos7(knotwid, a3);
z8 = z0r;
penpos8(knotwid, a3);
llrrexp(8);
penstroke z1e---z2e---z3e---z4e---z5e;
penstroke z7e---z8e;
enddef;
beginchar ("@", sqwid#, sqht#, 0); "soloman ll";
soloman_corner;
endchar;
beginchar ("A", sqwid#, sqht#, 0); "soloman lr";
soloman_corner;
currentpicture := (currentpicture rotated 90) shifted (w, 0);
endchar;
beginchar ("B", sqwid#, sqht#, 0); "soloman ur";
soloman_corner;
currentpicture := (currentpicture rotated 180) shifted (w, h);
endchar;
beginchar ("C", sqwid#, sqht#, 0); "soloman ul";
soloman_corner;
currentpicture := (currentpicture rotated 270) shifted (0, h);
endchar;
def soloman_side =
z0 = (0w,.5h);
penpos0(croswid, a4);
z1 = z0;
penpos1(knotwid, a4);
z2 = (.25w,.75h);
penpos2(knotwid, a4);
z3 = (.75w,.75h);
penpos3(knotwid, a3);
z4 = z5r;
penpos4(knotwid, a3);
z5 = (w,.5h);
penpos5(croswid, a2);
z6 = z5;
penpos6(knotwid, a2);
z7 = z8r;
penpos7(knotwid, a2);
z8 = (.5w,0h);
penpos8(croswid, a1);
z9 = z8;
penpos9(knotwid, a1);
z10 = z0r;
penpos10(knotwid, a1);
llrrexp(10);
penstroke z1e---z2e---z3e---z4e;
penstroke z6e---z7e;
penstroke z9e---z10e;
enddef;
beginchar ("D", sqwid#, sqht#, 0); "soloman u";
soloman_side;
endchar;
beginchar ("E", sqwid#, sqht#, 0); "soloman b";
soloman_side;
currentpicture := (currentpicture rotated 180) shifted (w, h);
endchar;
beginchar ("F", sqwid#, sqht#, 0); "soloman l";
soloman_side;
currentpicture := (currentpicture rotated 90) shifted (w, 0);
endchar;
beginchar ("G", sqwid#, sqht#, 0); "soloman r";
soloman_side;
currentpicture := (currentpicture rotated 270) shifted (0, h);
endchar;
beginchar ("H", sqwid#, sqht#, 0); "soloman mid";
z0 = (.5w,h);
penpos0(croswid, a3);
z1 = z0;
penpos1(knotwid, a3);
z2 = z3r;
penpos2(knotwid, a3);
z3 = (w,.5h);
penpos3(croswid, a2);
z4 = z3;
penpos4(knotwid, a2);
z5 = z6r;
penpos5(knotwid, a2);
z6 = (.5w, 0h);
penpos6(croswid, a1);
z7 = z6;
penpos7(knotwid, a1);
z8 = z9r;
penpos8(knotwid, a1);
z9 = (0w,.5h);
penpos9(croswid, a4);
z10 = z9;
penpos10(knotwid, a4);
z11 = z0r;
penpos11(knotwid, a4);
llrrexp(11);
penstroke z1e---z2e;
penstroke z4e---z5e;
penstroke z7e---z8e;
penstroke z10e---z11e;
endchar;
|