-
Notifications
You must be signed in to change notification settings - Fork 0
/
Floret.cs
306 lines (279 loc) · 84.1 KB
/
Floret.cs
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
304
305
306
using System;
using System.Collections.Generic;
using System.Linq;
namespace RT.Coordinates
{
/// <summary>
/// <para>
/// Describes a cell in a <see cref="Grid"/>. Each floret is a pentagon with one vertex “spikier” than the others.
/// That vertex can be thought of as the center of a hexagon, while the vertex two clockwise from that is a vertex
/// of the same hexagon. The remaining vertices are off from the hexagon’s edge but in such a way that 6 florets
/// make a flower-like shape which tiles the plane in a hexagonal pattern.</para></summary>
/// <remarks>
/// <para>
/// The “spikier” angles of six pentagons all meet at a vertex, so they must be 60°. The remaining angles are
/// therefore (540 − 60)/4 = 120°.</para>
/// <para>
/// The shorter side length of the pentagons is 1/√7. The following shows the derivation of this and the point
/// coordinates. This diagram assumes a side length of 1 for the underlying hexagon. The code assumes 3/2, i.e.,
/// it scales it up by a factor of 3/2.</para>
/// <code type="raw">
/// <svg font-size=".2px" text-anchor="middle" version="1.1" viewBox="-10.6 -11.977 46 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><symbol id="symbol7125" overflow="visible"><path d="m6.9844 23.422c0-.04687-.03125-.0625-.046875-.09375-.375-.375-1.0312-1.0312-1.7031-2.1094-1.6094-2.5781-2.3281-5.8125-2.3281-9.6562 0-2.6875.35938-6.1406 2-9.1094.78125-1.4219 1.6094-2.2344 2.0469-2.6719.03125-.03125.03125-.046875.03125-.078125 0-.10938-.078125-.10938-.21875-.10938s-.15625 0-.3125.15625c-3.3281 3.0469-4.375 7.6094-4.375 11.797 0 3.9219.89062 7.875 3.4219 10.859.20312.21875.57812.625.98438.98438.125.125.14062.125.28125.125s.21875 0 .21875-.09375z"/></symbol><symbol id="symbol6155" overflow="visible"><path d="m5.25 11.562c0-3.9219-.89062-7.8594-3.4219-10.844-.20312-.23438-.57812-.64062-.98438-1-.125-.125-.14062-.125-.28125-.125-.125 0-.21875 0-.21875.10938 0 .03125.046875.078125.0625.09375.34375.35938 1.0156 1.0312 1.6875 2.1094 1.6094 2.5625 2.3281 5.8125 2.3281 9.6406 0 2.6875-.35938 6.1406-2 9.125-.78125 1.4062-1.6094 2.2344-2.0312 2.6562-.015625.03125-.046875.0625-.046875.09375 0 .09375.09375.09375.21875.09375.14062 0 .15625 0 .3125-.15625 3.3281-3.0312 4.375-7.5938 4.375-11.797z"/></symbol><symbol id="symbol47" overflow="visible"><path d="m5.1406 17.422.10938.10938h.21875c.03125 0 .10938 0 .10938-.09375 0-.04687-.015625-.0625-.03125-.09375-.35938-.35938-.90625-.90625-1.5156-2-1.0781-1.9219-1.4844-4.375-1.4844-6.7656 0-4.4375 1.2656-7.0312 3-8.7969.03125-.03125.03125-.0625.03125-.078125 0-.10938-.0625-.10938-.1875-.10938s-.14062 0-.23438.09375c-.95312.8125-2.0156 2.2031-2.7031 4.2969-.42188 1.3125-.65625 2.9219-.65625 4.5781 0 2.3594.42188 5.0312 1.9844 7.3438.28125.39062.64062.79688.64062.8125.10938.125.25.28125.32812.34375z"/></symbol><symbol id="symbol4999" overflow="visible"><path d="m4.1406 8.5625c0-2.8594-.65625-5.9062-2.625-8.1406-.14062-.15625-.51562-.54688-.75-.76562-.0625-.0625-.09375-.0625-.21875-.0625-.09375 0-.1875 0-.1875.10938 0 .03125.046875.078125.0625.09375.32812.35938.875.90625 1.4844 2 1.0781 1.9062 1.4844 4.375 1.4844 6.7656 0 4.3281-1.2031 6.9688-2.9844 8.7969-.03125.015625-.046875.046875-.046875.078125 0 .09375.09375.09375.1875.09375.125 0 .15625 0 .23438-.07813.95312-.8125 2.0156-2.2031 2.7031-4.2969.4375-1.375.65625-2.9844.65625-4.5938z"/></symbol><symbol id="symbol699" overflow="visible"><path d="m2.9375-6.375c0-.25 0-.26562-.23438-.26562-.625.64062-1.5.64062-1.8125.64062v.3125c.20312 0 .78125 0 1.2969-.26562v5.1719c0 .35938-.03125.46875-.92188.46875h-.3125v.3125c.34375-.03125 1.2031-.03125 1.6094-.03125.39062 0 1.2656 0 1.6094.03125v-.3125h-.3125c-.90625 0-.92188-.10938-.92188-.46875z"/></symbol><symbol id="symbol6191" overflow="visible"><path d="m1.2656-.76562 1.0625-1.0312c1.5469-1.375 2.1406-1.9062 2.1406-2.9062 0-1.1406-.89062-1.9375-2.1094-1.9375-1.125 0-1.8594.92188-1.8594 1.8125 0 .54688.5.54688.53125.54688.17188 0 .51562-.10938.51562-.53125 0-.25-.1875-.51562-.53125-.51562-.078125 0-.09375 0-.125.015625.21875-.65625.76562-1.0156 1.3438-1.0156.90625 0 1.3281.8125 1.3281 1.625 0 .79688-.48438 1.5781-1.0469 2.2031l-1.9062 2.125c-.10938.10938-.10938.14062-.10938.375h3.7031l.26562-1.7344h-.23438c-.0625.29688-.125.73438-.23438.89062-.0625.078125-.71875.078125-.9375.078125z"/></symbol><symbol id="symbol7217" overflow="visible"><path d="m6.8438-3.2656c.15625 0 .34375 0 .34375-.1875 0-.20312-.1875-.20312-.32812-.20312h-5.9688c-.14062 0-.32812 0-.32812.20312 0 .1875.1875.1875.32812.1875zm.015625 1.9375c.14062 0 .32812 0 .32812-.20312 0-.1875-.1875-.1875-.34375-.1875h-5.9531c-.14062 0-.32812 0-.32812.1875 0 .20312.1875.20312.32812.20312z"/></symbol><symbol id="symbol7071" overflow="visible"><path d="m4.0781-2.2969h2.7812c.14062 0 .32812 0 .32812-.20312 0-.1875-.1875-.1875-.32812-.1875h-2.7812v-2.7969c0-.14062 0-.32812-.20312-.32812s-.20312.1875-.20312.32812v2.7969h-2.7812c-.14062 0-.32812 0-.32812.1875 0 .20312.1875.20312.32812.20312h2.7812v2.7969c0 .14062 0 .32812.20312.32812s.20312-.1875.20312-.32812z"/></symbol><symbol id="symbol1612" overflow="visible"><path d="m1.1719-2.1719c0-1.625.8125-2.0469 1.3438-2.0469.09375 0 .71875.015625 1.0625.375-.40625.03125-.46875.32812-.46875.45312 0 .26562.1875.45312.45312.45312s.46875-.15625.46875-.46875c0-.67188-.76562-1.0625-1.5312-1.0625-1.25 0-2.1562 1.0781-2.1562 2.3125 0 1.2812.98438 2.2656 2.1406 2.2656 1.3281 0 1.6562-1.2031 1.6562-1.2969s-.10938-.09375-.14062-.09375c-.078125 0-.10938.03125-.125.09375-.28125.92188-.9375 1.0469-1.2969 1.0469-.53125 0-1.4062-.42188-1.4062-2.0312z"/></symbol><symbol id="symbol2470" overflow="visible"><path d="m4.6875-2.1406c0-1.2656-.98438-2.3281-2.1875-2.3281-1.25 0-2.2188 1.0938-2.2188 2.3281 0 1.2969 1.0312 2.25 2.2031 2.25 1.2031 0 2.2031-.98438 2.2031-2.25zm-2.1875 2c-.4375 0-.875-.20312-1.1406-.67188-.25-.4375-.25-1.0469-.25-1.4062 0-.39062 0-.92188.23438-1.3594.26562-.45312.73438-.67188 1.1406-.67188.4375 0 .85938.21875 1.125.65625.26562.42188.26562 1 .26562 1.375 0 .35938 0 .90625-.21875 1.3438-.23438.45312-.67188.73438-1.1562.73438z"/></symbol><symbol id="symbol3064" overflow="visible"><path d="m2.0781-1.9375c.21875.046875 1.0312.20312 1.0312.92188 0 .5-.34375.90625-1.125.90625-.84375 0-1.2031-.5625-1.3906-1.4219-.03125-.125-.03125-.15625-.14062-.15625-.125 0-.125.0625-.125.23438v1.3281c0 .17188 0 .23438.10938.23438.046875 0 .0625-.015625.25-.20312.015625-.015625.015625-.03125.20312-.21875.4375.40625.89062.42188 1.0938.42188 1.1406 0 1.6094-.67188 1.6094-1.3906 0-.51562-.29688-.82812-.42188-.9375-.32812-.32812-.71875-.40625-1.1406-.48438-.5625-.10938-1.2188-.23438-1.2188-.8125 0-.35938.25-.76562 1.1094-.76562 1.0938 0 1.1562.90625 1.1719 1.2031 0 .09375.09375.09375.10938.09375.14062 0 .14062-.046875.14062-.23438v-1.0156c0-.15625 0-.23438-.10938-.23438-.046875 0-.078125 0-.20312.125-.03125.03125-.125.125-.17188.15625-.375-.28125-.78125-.28125-.9375-.28125-1.2188 0-1.5938.67188-1.5938 1.2344 0 .34375.15625.625.42188.84375.32812.25.60938.3125 1.3281.45312z"/></symbol><symbol id="symbol5439" overflow="visible"><path d="m4.5781-3.1875c0-.79688-.046875-1.5938-.39062-2.3281-.45312-.96875-1.2812-1.125-1.6875-1.125-.60938 0-1.3281.26562-1.75 1.1875-.3125.6875-.35938 1.4688-.35938 2.2656 0 .75.03125 1.6406.45312 2.4062.42188.79688 1.1562 1 1.6406 1 .53125 0 1.2969-.20312 1.7344-1.1562.3125-.6875.35938-1.4688.35938-2.25zm-2.0938 3.1875c-.39062 0-.98438-.25-1.1562-1.2031-.10938-.59375-.10938-1.5156-.10938-2.1094 0-.64062 0-1.2969.078125-1.8281.1875-1.1875.9375-1.2812 1.1875-1.2812.32812 0 .98438.1875 1.1719 1.1719.10938.5625.10938 1.3125.10938 1.9375 0 .75 0 1.4219-.10938 2.0625-.15625.95312-.71875 1.25-1.1719 1.25z"/></symbol><symbol id="symbol5061" overflow="visible"><path d="m2.9375-1.6406v.85938c0 .35938-.03125.46875-.76562.46875h-.20312v.3125c.40625-.03125.92188-.03125 1.3438-.03125s.9375 0 1.3594.03125v-.3125h-.21875c-.73438 0-.75-.10938-.75-.46875v-.85938h.98438v-.3125h-.98438v-4.5312c0-.20312 0-.26562-.17188-.26562-.078125 0-.10938 0-.1875.125l-3.0625 4.6719v.3125zm.046875-.3125h-2.4219l2.4219-3.7188z"/></symbol><symbol id="symbol2078" overflow="visible"><path d="m4.4688-2c0-1.1875-.8125-2.1875-1.8906-2.1875-.46875 0-.90625.15625-1.2656.51562v-1.9531c.20312.0625.53125.125.84375.125 1.2344 0 1.9375-.90625 1.9375-1.0312 0-.0625-.03125-.10938-.10938-.10938 0 0-.03125 0-.078125.03125-.20312.09375-.6875.29688-1.3594.29688-.39062 0-.85938-.078125-1.3281-.28125-.078125-.03125-.09375-.03125-.10938-.03125-.10938 0-.10938.078125-.10938.23438v2.9531c0 .17188 0 .25.14062.25.078125 0 .09375-.015625.14062-.078125.10938-.15625.46875-.70312 1.2812-.70312.51562 0 .76562.45312.84375.64062.15625.375.1875.75.1875 1.25 0 .35938 0 .95312-.25 1.375-.23438.39062-.60938.64062-1.0625.64062-.71875 0-1.2969-.53125-1.4688-1.1094.03125 0 .0625.015625.17188.015625.32812 0 .5-.25.5-.48438 0-.25-.17188-.5-.5-.5-.14062 0-.48438.078125-.48438.53125 0 .85938.6875 1.8281 1.7969 1.8281 1.1562 0 2.1719-.95312 2.1719-2.2188z"/></symbol><symbol id="symbol3266" overflow="visible"><path d="m4.75-6.0781c.078125-.10938.078125-.125.078125-.34375h-2.4219c-1.2031 0-1.2344-.125-1.2656-.3125h-.25l-.32812 2.0469h.25c.03125-.15625.10938-.78125.25-.90625.0625-.0625.84375-.0625.96875-.0625h2.0625c-.10938.15625-.89062 1.25-1.1094 1.5781-.90625 1.3438-1.2344 2.7344-1.2344 3.75 0 .09375 0 .54688.46875.54688.45312 0 .45312-.45312.45312-.54688v-.51562c0-.54688.03125-1.0938.10938-1.625.046875-.23438.17188-1.0938.625-1.7031z"/></symbol><symbol id="symbol2641" overflow="visible"><path d="m3.5156-1.2656h-.23438c-.015625.15625-.09375.5625-.1875.625-.046875.046875-.57812.046875-.6875.046875h-1.2812c.73438-.64062.98438-.84375 1.3906-1.1719.51562-.40625 1-.84375 1-1.5 0-.84375-.73438-1.3594-1.625-1.3594-.85938 0-1.4531.60938-1.4531 1.25 0 .34375.29688.39062.375.39062.15625 0 .35938-.125.35938-.375 0-.125-.046875-.375-.40625-.375.21875-.48438.6875-.64062 1.0156-.64062.70312 0 1.0625.54688 1.0625 1.1094 0 .60938-.4375 1.0781-.65625 1.3281l-1.6719 1.6719c-.078125.0625-.078125.078125-.078125.26562h2.875z"/></symbol><symbol id="symbol8254" overflow="visible"><path d="m3.8906-3.7344c-.26562.015625-.46875.23438-.46875.45312 0 .14062.09375.29688.3125.29688s.45312-.17188.45312-.5625c0-.45312-.42188-.85938-1.1875-.85938-1.3125 0-1.6875 1.0156-1.6875 1.4531 0 .78125.73438.92188 1.0312.98438.51562.10938 1.0312.21875 1.0312.76562 0 .25-.21875 1.0938-1.4219 1.0938-.14062 0-.90625 0-1.1406-.53125.39062.046875.64062-.25.64062-.53125 0-.21875-.17188-.34375-.375-.34375-.26562 0-.5625.20312-.5625.65625 0 .5625.57812.96875 1.4219.96875 1.625 0 2.0156-1.2031 2.0156-1.6562 0-.35938-.1875-.60938-.3125-.71875-.26562-.28125-.5625-.34375-1-.42188-.35938-.078125-.75-.15625-.75-.60938 0-.28125.23438-.89062 1.1094-.89062.25 0 .75.078125.89062.45312z"/></symbol><symbol id="symbol9623" overflow="visible"><path d="m6.5625-2.2969c.17188 0 .35938 0 .35938-.20312 0-.1875-.1875-.1875-.35938-.1875h-5.3906c-.17188 0-.34375 0-.34375.1875 0 .20312.17188.20312.34375.20312z"/></symbol><symbol id="symbol5098" overflow="visible"><path d="m3.875 8.5156-1.75-3.875c-.078125-.15625-.125-.15625-.15625-.15625 0 0-.0625 0-.17188.078125l-.9375.71875c-.125.10938-.125.125-.125.15625 0 .0625.015625.10938.09375.10938.0625 0 .23438-.14062.34375-.21875.046875-.046875.20312-.15625.3125-.23438l1.9688 4.3125c.0625.15625.10938.15625.20312.15625.15625 0 .1875-.046875.25-.1875l4.5312-9.375c.0625-.14062.0625-.17188.0625-.20312 0-.09375-.078125-.20312-.20312-.20312-.078125 0-.14062.0625-.21875.21875z"/></symbol><symbol id="symbol8680" overflow="visible"><path d="m3.5312-1.7344c0-.84375-.67188-1.5-1.5-1.5s-1.5.67188-1.5 1.4844c0 .84375.6875 1.5 1.5 1.5.84375 0 1.5-.67188 1.5-1.4844zm-1.5 1.1406c-.65625 0-1.1562-.53125-1.1562-1.1406 0-.65625.51562-1.1719 1.1562-1.1719.65625 0 1.1562.53125 1.1562 1.1562 0 .65625-.51562 1.1562-1.1562 1.1562z"/></symbol><symbol id="symbol6125" overflow="visible"><path d="m3.3281-3.0156c.0625-.25.29688-1.1719.98438-1.1719.046875 0 .29688 0 .5.125-.28125.0625-.46875.29688-.46875.54688 0 .15625.10938.34375.375.34375.21875 0 .53125-.17188.53125-.57812 0-.51562-.57812-.65625-.92188-.65625-.57812 0-.92188.53125-1.0469.75-.25-.65625-.78125-.75-1.0781-.75-1.0312 0-1.6094 1.2812-1.6094 1.5312 0 .10938.10938.10938.125.10938.078125 0 .10938-.03125.125-.10938.34375-1.0625 1-1.3125 1.3438-1.3125.1875 0 .53125.09375.53125.67188 0 .3125-.17188.96875-.53125 2.375-.15625.60938-.51562 1.0312-.95312 1.0312-.0625 0-.28125 0-.5-.125.25-.0625.46875-.26562.46875-.54688 0-.26562-.21875-.34375-.35938-.34375-.3125 0-.54688.25-.54688.57812 0 .45312.48438.65625.92188.65625.67188 0 1.0312-.70312 1.0469-.75.125.35938.48438.75 1.0781.75 1.0312 0 1.5938-1.2812 1.5938-1.5312 0-.10938-.078125-.10938-.10938-.10938-.09375 0-.10938.046875-.14062.10938-.32812 1.0781-1 1.3125-1.3125 1.3125-.39062 0-.54688-.3125-.54688-.65625 0-.21875.046875-.4375.15625-.875z"/></symbol><symbol id="symbol1075" overflow="visible"><path d="m4.8438-3.7969c.046875-.14062.046875-.15625.046875-.23438 0-.17188-.14062-.26562-.29688-.26562-.09375 0-.25.0625-.34375.20312-.015625.0625-.10938.35938-.14062.54688-.078125.25-.14062.53125-.20312.79688l-.45312 1.7969c-.03125.14062-.46875.84375-1.125.84375-.5 0-.60938-.4375-.60938-.8125 0-.45312.17188-1.0781.5-1.9531.15625-.40625.20312-.51562.20312-.71875 0-.4375-.3125-.8125-.8125-.8125-.95312 0-1.3125 1.4531-1.3125 1.5312 0 .10938.09375.10938.10938.10938.10938 0 .10938-.03125.15625-.1875.28125-.9375.67188-1.2344 1.0156-1.2344.078125 0 .25 0 .25.3125 0 .25-.10938.51562-.17188.70312-.40625 1.0625-.57812 1.625-.57812 2.0938 0 .89062.625 1.1875 1.2188 1.1875.39062 0 .71875-.17188 1-.45312-.125.51562-.25 1.0156-.64062 1.5469-.26562.32812-.64062.625-1.0938.625-.14062 0-.59375-.03125-.76562-.42188.15625 0 .29688 0 .42188-.125.10938-.078125.20312-.21875.20312-.40625 0-.3125-.26562-.34375-.35938-.34375-.23438 0-.5625.15625-.5625.64062 0 .5.4375.875 1.0625.875 1.0156 0 2.0469-.90625 2.3281-2.0312z"/></symbol><symbol id="symbol5184" overflow="visible"><path d="m3.8906-3.7344c-.26562.015625-.46875.23438-.46875.45312 0 .14062.09375.29688.3125.29688s.45312-.17188.45312-.5625c0-.45312-.42188-.85938-1.1875-.85938-1.3125 0-1.6875 1.0156-1.6875 1.4531 0 .78125.73438.92188 1.0312.98438.51562.10938 1.0312.21875 1.0312.76562 0 .25-.21875 1.0938-1.4219 1.0938-.14062 0-.90625 0-1.1406-.53125.39062.046875.64062-.25.64062-.53125 0-.21875-.17188-.34375-.375-.34375-.26562 0-.5625.20312-.5625.65625 0 .5625.57812.96875 1.4219.96875 1.625 0 2.0156-1.2031 2.0156-1.6562 0-.35938-.1875-.60938-.3125-.71875-.26562-.28125-.5625-.34375-1-.42188-.35938-.078125-.75-.15625-.75-.60938 0-.28125.23438-.89062 1.1094-.89062.25 0 .75.078125.89062.45312z"/></symbol><symbol id="symbol8400" overflow="visible"><path d="m3.5156-1.2656h-.23438c-.015625.15625-.09375.5625-.1875.625-.046875.046875-.57812.046875-.6875.046875h-1.2812c.73438-.64062.98438-.84375 1.3906-1.1719.51562-.40625 1-.84375 1-1.5 0-.84375-.73438-1.3594-1.625-1.3594-.85938 0-1.4531.60938-1.4531 1.25 0 .34375.29688.39062.375.39062.15625 0 .35938-.125.35938-.375 0-.125-.046875-.375-.40625-.375.21875-.48438.6875-.64062 1.0156-.64062.70312 0 1.0625.54688 1.0625 1.1094 0 .60938-.4375 1.0781-.65625 1.3281l-1.6719 1.6719c-.078125.0625-.078125.078125-.078125.26562h2.875z"/></symbol><symbol id="symbol8844" overflow="visible"><path d="m4.0781-2.2969h2.7812c.14062 0 .32812 0 .32812-.20312 0-.1875-.1875-.1875-.32812-.1875h-2.7812v-2.7969c0-.14062 0-.32812-.20312-.32812s-.20312.1875-.20312.32812v2.7969h-2.7812c-.14062 0-.32812 0-.32812.1875 0 .20312.1875.20312.32812.20312h2.7812v2.7969c0 .14062 0 .32812.20312.32812s.20312-.1875.20312-.32812z"/></symbol><symbol id="symbol6159" overflow="visible"><path d="m6.8438-3.2656c.15625 0 .34375 0 .34375-.1875 0-.20312-.1875-.20312-.32812-.20312h-5.9688c-.14062 0-.32812 0-.32812.20312 0 .1875.1875.1875.32812.1875zm.015625 1.9375c.14062 0 .32812 0 .32812-.20312 0-.1875-.1875-.1875-.34375-.1875h-5.9531c-.14062 0-.32812 0-.32812.1875 0 .20312.1875.20312.32812.20312z"/></symbol><symbol id="symbol6206" overflow="visible"><path d="m2.9375-6.375c0-.25 0-.26562-.23438-.26562-.625.64062-1.5.64062-1.8125.64062v.3125c.20312 0 .78125 0 1.2969-.26562v5.1719c0 .35938-.03125.46875-.92188.46875h-.3125v.3125c.34375-.03125 1.2031-.03125 1.6094-.03125.39062 0 1.2656 0 1.6094.03125v-.3125h-.3125c-.90625 0-.92188-.10938-.92188-.46875z"/></symbol><symbol id="symbol7221" overflow="visible"><path d="m4.75-6.0781c.078125-.10938.078125-.125.078125-.34375h-2.4219c-1.2031 0-1.2344-.125-1.2656-.3125h-.25l-.32812 2.0469h.25c.03125-.15625.10938-.78125.25-.90625.0625-.0625.84375-.0625.96875-.0625h2.0625c-.10938.15625-.89062 1.25-1.1094 1.5781-.90625 1.3438-1.2344 2.7344-1.2344 3.75 0 .09375 0 .54688.46875.54688.45312 0 .45312-.45312.45312-.54688v-.51562c0-.54688.03125-1.0938.10938-1.625.046875-.23438.17188-1.0938.625-1.7031z"/></symbol><symbol id="symbol2388" overflow="visible"><path d="m6.9844 23.422c0-.04687-.03125-.0625-.046875-.09375-.375-.375-1.0312-1.0312-1.7031-2.1094-1.6094-2.5781-2.3281-5.8125-2.3281-9.6562 0-2.6875.35938-6.1406 2-9.1094.78125-1.4219 1.6094-2.2344 2.0469-2.6719.03125-.03125.03125-.046875.03125-.078125 0-.10938-.078125-.10938-.21875-.10938s-.15625 0-.3125.15625c-3.3281 3.0469-4.375 7.6094-4.375 11.797 0 3.9219.89062 7.875 3.4219 10.859.20312.21875.57812.625.98438.98438.125.125.14062.125.28125.125s.21875 0 .21875-.09375z"/></symbol><symbol id="symbol2620" overflow="visible"><path d="m5.25 11.562c0-3.9219-.89062-7.8594-3.4219-10.844-.20312-.23438-.57812-.64062-.98438-1-.125-.125-.14062-.125-.28125-.125-.125 0-.21875 0-.21875.10938 0 .03125.046875.078125.0625.09375.34375.35938 1.0156 1.0312 1.6875 2.1094 1.6094 2.5625 2.3281 5.8125 2.3281 9.6406 0 2.6875-.35938 6.1406-2 9.125-.78125 1.4062-1.6094 2.2344-2.0312 2.6562-.015625.03125-.046875.0625-.046875.09375 0 .09375.09375.09375.21875.09375.14062 0 .15625 0 .3125-.15625 3.3281-3.0312 4.375-7.5938 4.375-11.797z"/></symbol><symbol id="symbol997" overflow="visible"><path d="m5.1406 17.422.10938.10938h.21875c.03125 0 .10938 0 .10938-.09375 0-.04687-.015625-.0625-.03125-.09375-.35938-.35938-.90625-.90625-1.5156-2-1.0781-1.9219-1.4844-4.375-1.4844-6.7656 0-4.4375 1.2656-7.0312 3-8.7969.03125-.03125.03125-.0625.03125-.078125 0-.10938-.0625-.10938-.1875-.10938s-.14062 0-.23438.09375c-.95312.8125-2.0156 2.2031-2.7031 4.2969-.42188 1.3125-.65625 2.9219-.65625 4.5781 0 2.3594.42188 5.0312 1.9844 7.3438.28125.39062.64062.79688.64062.8125.10938.125.25.28125.32812.34375z"/></symbol><symbol id="symbol9132" overflow="visible"><path d="m4.1406 8.5625c0-2.8594-.65625-5.9062-2.625-8.1406-.14062-.15625-.51562-.54688-.75-.76562-.0625-.0625-.09375-.0625-.21875-.0625-.09375 0-.1875 0-.1875.10938 0 .03125.046875.078125.0625.09375.32812.35938.875.90625 1.4844 2 1.0781 1.9062 1.4844 4.375 1.4844 6.7656 0 4.3281-1.2031 6.9688-2.9844 8.7969-.03125.015625-.046875.046875-.046875.078125 0 .09375.09375.09375.1875.09375.125 0 .15625 0 .23438-.07813.95312-.8125 2.0156-2.2031 2.7031-4.2969.4375-1.375.65625-2.9844.65625-4.5938z"/></symbol><symbol id="symbol1193" overflow="visible"><path d="m2.9375-6.375c0-.25 0-.26562-.23438-.26562-.625.64062-1.5.64062-1.8125.64062v.3125c.20312 0 .78125 0 1.2969-.26562v5.1719c0 .35938-.03125.46875-.92188.46875h-.3125v.3125c.34375-.03125 1.2031-.03125 1.6094-.03125.39062 0 1.2656 0 1.6094.03125v-.3125h-.3125c-.90625 0-.92188-.10938-.92188-.46875z"/></symbol><symbol id="symbol7367" overflow="visible"><path d="m1.2656-.76562 1.0625-1.0312c1.5469-1.375 2.1406-1.9062 2.1406-2.9062 0-1.1406-.89062-1.9375-2.1094-1.9375-1.125 0-1.8594.92188-1.8594 1.8125 0 .54688.5.54688.53125.54688.17188 0 .51562-.10938.51562-.53125 0-.25-.1875-.51562-.53125-.51562-.078125 0-.09375 0-.125.015625.21875-.65625.76562-1.0156 1.3438-1.0156.90625 0 1.3281.8125 1.3281 1.625 0 .79688-.48438 1.5781-1.0469 2.2031l-1.9062 2.125c-.10938.10938-.10938.14062-.10938.375h3.7031l.26562-1.7344h-.23438c-.0625.29688-.125.73438-.23438.89062-.0625.078125-.71875.078125-.9375.078125z"/></symbol><symbol id="symbol5632" overflow="visible"><path d="m4.0781-2.2969h2.7812c.14062 0 .32812 0 .32812-.20312 0-.1875-.1875-.1875-.32812-.1875h-2.7812v-2.7969c0-.14062 0-.32812-.20312-.32812s-.20312.1875-.20312.32812v2.7969h-2.7812c-.14062 0-.32812 0-.32812.1875 0 .20312.1875.20312.32812.20312h2.7812v2.7969c0 .14062 0 .32812.20312.32812s.20312-.1875.20312-.32812z"/></symbol><symbol id="symbol2968" overflow="visible"><path d="m6.8438-3.2656c.15625 0 .34375 0 .34375-.1875 0-.20312-.1875-.20312-.32812-.20312h-5.9688c-.14062 0-.32812 0-.32812.20312 0 .1875.1875.1875.32812.1875zm.015625 1.9375c.14062 0 .32812 0 .32812-.20312 0-.1875-.1875-.1875-.34375-.1875h-5.9531c-.14062 0-.32812 0-.32812.1875 0 .20312.1875.20312.32812.20312z"/></symbol><symbol id="symbol7949" overflow="visible"><path d="m1.625-4.5625c-.45312-.29688-.5-.625-.5-.79688 0-.60938.65625-1.0312 1.3594-1.0312.71875 0 1.3594.51562 1.3594 1.2344 0 .57812-.39062 1.0469-.98438 1.3906zm1.4531.95312c.71875-.375 1.2031-.89062 1.2031-1.5469 0-.92188-.875-1.4844-1.7812-1.4844-1 0-1.8125.73438-1.8125 1.6719 0 .17188.015625.625.4375 1.0938.10938.10938.48438.35938.73438.53125-.57812.29688-1.4375.84375-1.4375 1.8438 0 1.0469 1.0156 1.7188 2.0625 1.7188 1.125 0 2.0781-.82812 2.0781-1.8906 0-.35938-.10938-.8125-.5-1.2344-.1875-.20312-.34375-.29688-.98438-.70312zm-1 .42188 1.2344.78125c.28125.1875.75.48438.75 1.0938 0 .73438-.75 1.25-1.5625 1.25-.85938 0-1.5781-.60938-1.5781-1.4375 0-.57812.3125-1.2188 1.1562-1.6875z"/></symbol><symbol id="symbol8924" overflow="visible"><path d="m6.5625-2.2969c.17188 0 .35938 0 .35938-.20312 0-.1875-.1875-.1875-.35938-.1875h-5.3906c-.17188 0-.34375 0-.34375.1875 0 .20312.17188.20312.34375.20312z"/></symbol><symbol id="symbol4166" overflow="visible"><path d="m3.3281-3.0156c.0625-.25.29688-1.1719.98438-1.1719.046875 0 .29688 0 .5.125-.28125.0625-.46875.29688-.46875.54688 0 .15625.10938.34375.375.34375.21875 0 .53125-.17188.53125-.57812 0-.51562-.57812-.65625-.92188-.65625-.57812 0-.92188.53125-1.0469.75-.25-.65625-.78125-.75-1.0781-.75-1.0312 0-1.6094 1.2812-1.6094 1.5312 0 .10938.10938.10938.125.10938.078125 0 .10938-.03125.125-.10938.34375-1.0625 1-1.3125 1.3438-1.3125.1875 0 .53125.09375.53125.67188 0 .3125-.17188.96875-.53125 2.375-.15625.60938-.51562 1.0312-.95312 1.0312-.0625 0-.28125 0-.5-.125.25-.0625.46875-.26562.46875-.54688 0-.26562-.21875-.34375-.35938-.34375-.3125 0-.54688.25-.54688.57812 0 .45312.48438.65625.92188.65625.67188 0 1.0312-.70312 1.0469-.75.125.35938.48438.75 1.0781.75 1.0312 0 1.5938-1.2812 1.5938-1.5312 0-.10938-.078125-.10938-.10938-.10938-.09375 0-.10938.046875-.14062.10938-.32812 1.0781-1 1.3125-1.3125 1.3125-.39062 0-.54688-.3125-.54688-.65625 0-.21875.046875-.4375.15625-.875z"/></symbol><symbol id="symbol6888" overflow="visible"><path d="m4.8438-3.7969c.046875-.14062.046875-.15625.046875-.23438 0-.17188-.14062-.26562-.29688-.26562-.09375 0-.25.0625-.34375.20312-.015625.0625-.10938.35938-.14062.54688-.078125.25-.14062.53125-.20312.79688l-.45312 1.7969c-.03125.14062-.46875.84375-1.125.84375-.5 0-.60938-.4375-.60938-.8125 0-.45312.17188-1.0781.5-1.9531.15625-.40625.20312-.51562.20312-.71875 0-.4375-.3125-.8125-.8125-.8125-.95312 0-1.3125 1.4531-1.3125 1.5312 0 .10938.09375.10938.10938.10938.10938 0 .10938-.03125.15625-.1875.28125-.9375.67188-1.2344 1.0156-1.2344.078125 0 .25 0 .25.3125 0 .25-.10938.51562-.17188.70312-.40625 1.0625-.57812 1.625-.57812 2.0938 0 .89062.625 1.1875 1.2188 1.1875.39062 0 .71875-.17188 1-.45312-.125.51562-.25 1.0156-.64062 1.5469-.26562.32812-.64062.625-1.0938.625-.14062 0-.59375-.03125-.76562-.42188.15625 0 .29688 0 .42188-.125.10938-.078125.20312-.21875.20312-.40625 0-.3125-.26562-.34375-.35938-.34375-.23438 0-.5625.15625-.5625.64062 0 .5.4375.875 1.0625.875 1.0156 0 2.0469-.90625 2.3281-2.0312z"/></symbol><symbol id="symbol1459" overflow="visible"><path d="m3.8906-3.7344c-.26562.015625-.46875.23438-.46875.45312 0 .14062.09375.29688.3125.29688s.45312-.17188.45312-.5625c0-.45312-.42188-.85938-1.1875-.85938-1.3125 0-1.6875 1.0156-1.6875 1.4531 0 .78125.73438.92188 1.0312.98438.51562.10938 1.0312.21875 1.0312.76562 0 .25-.21875 1.0938-1.4219 1.0938-.14062 0-.90625 0-1.1406-.53125.39062.046875.64062-.25.64062-.53125 0-.21875-.17188-.34375-.375-.34375-.26562 0-.5625.20312-.5625.65625 0 .5625.57812.96875 1.4219.96875 1.625 0 2.0156-1.2031 2.0156-1.6562 0-.35938-.1875-.60938-.3125-.71875-.26562-.28125-.5625-.34375-1-.42188-.35938-.078125-.75-.15625-.75-.60938 0-.28125.23438-.89062 1.1094-.89062.25 0 .75.078125.89062.45312z"/></symbol><symbol id="symbol806" overflow="visible"><path d="m3.5156-1.2656h-.23438c-.015625.15625-.09375.5625-.1875.625-.046875.046875-.57812.046875-.6875.046875h-1.2812c.73438-.64062.98438-.84375 1.3906-1.1719.51562-.40625 1-.84375 1-1.5 0-.84375-.73438-1.3594-1.625-1.3594-.85938 0-1.4531.60938-1.4531 1.25 0 .34375.29688.39062.375.39062.15625 0 .35938-.125.35938-.375 0-.125-.046875-.375-.40625-.375.21875-.48438.6875-.64062 1.0156-.64062.70312 0 1.0625.54688 1.0625 1.1094 0 .60938-.4375 1.0781-.65625 1.3281l-1.6719 1.6719c-.078125.0625-.078125.078125-.078125.26562h2.875z"/></symbol><symbol id="symbol5562" overflow="visible"><path d="m2.9375-6.375c0-.25 0-.26562-.23438-.26562-.625.64062-1.5.64062-1.8125.64062v.3125c.20312 0 .78125 0 1.2969-.26562v5.1719c0 .35938-.03125.46875-.92188.46875h-.3125v.3125c.34375-.03125 1.2031-.03125 1.6094-.03125.39062 0 1.2656 0 1.6094.03125v-.3125h-.3125c-.90625 0-.92188-.10938-.92188-.46875z"/></symbol><symbol id="symbol4770" overflow="visible"><path d="m2.9375-1.6406v.85938c0 .35938-.03125.46875-.76562.46875h-.20312v.3125c.40625-.03125.92188-.03125 1.3438-.03125s.9375 0 1.3594.03125v-.3125h-.21875c-.73438 0-.75-.10938-.75-.46875v-.85938h.98438v-.3125h-.98438v-4.5312c0-.20312 0-.26562-.17188-.26562-.078125 0-.10938 0-.1875.125l-3.0625 4.6719v.3125zm.046875-.3125h-2.4219l2.4219-3.7188z"/></symbol><symbol id="symbol7919" overflow="visible"><path d="m6.8438-3.2656c.15625 0 .34375 0 .34375-.1875 0-.20312-.1875-.20312-.32812-.20312h-5.9688c-.14062 0-.32812 0-.32812.20312 0 .1875.1875.1875.32812.1875zm.015625 1.9375c.14062 0 .32812 0 .32812-.20312 0-.1875-.1875-.1875-.34375-.1875h-5.9531c-.14062 0-.32812 0-.32812.1875 0 .20312.1875.20312.32812.20312z"/></symbol><symbol id="symbol5544" overflow="visible"><path d="m2.8906-3.5156c.8125-.26562 1.3906-.95312 1.3906-1.75 0-.8125-.875-1.375-1.8281-1.375-1 0-1.7656.59375-1.7656 1.3594 0 .32812.21875.51562.51562.51562s.5-.21875.5-.51562c0-.48438-.46875-.48438-.60938-.48438.29688-.5.95312-.625 1.3125-.625.42188 0 .96875.21875.96875 1.1094 0 .125-.03125.70312-.28125 1.1406-.29688.48438-.64062.51562-.89062.51562-.078125.015625-.3125.03125-.39062.03125-.078125.015625-.14062.03125-.14062.125 0 .10938.0625.10938.23438.10938h.4375c.8125 0 1.1875.67188 1.1875 1.6562 0 1.3594-.6875 1.6406-1.125 1.6406s-1.1875-.17188-1.5312-.75c.34375.046875.65625-.17188.65625-.54688 0-.35938-.26562-.5625-.54688-.5625-.25 0-.5625.14062-.5625.57812 0 .90625.92188 1.5625 2.0156 1.5625 1.2188 0 2.125-.90625 2.125-1.9219 0-.8125-.64062-1.5938-1.6719-1.8125z"/></symbol><symbol id="symbol76" overflow="visible"><path d="m1.2656-.76562 1.0625-1.0312c1.5469-1.375 2.1406-1.9062 2.1406-2.9062 0-1.1406-.89062-1.9375-2.1094-1.9375-1.125 0-1.8594.92188-1.8594 1.8125 0 .54688.5.54688.53125.54688.17188 0 .51562-.10938.51562-.53125 0-.25-.1875-.51562-.53125-.51562-.078125 0-.09375 0-.125.015625.21875-.65625.76562-1.0156 1.3438-1.0156.90625 0 1.3281.8125 1.3281 1.625 0 .79688-.48438 1.5781-1.0469 2.2031l-1.9062 2.125c-.10938.10938-.10938.14062-.10938.375h3.7031l.26562-1.7344h-.23438c-.0625.29688-.125.73438-.23438.89062-.0625.078125-.71875.078125-.9375.078125z"/></symbol><symbol id="symbol2596" overflow="visible"><path d="m1.625-4.5625c-.45312-.29688-.5-.625-.5-.79688 0-.60938.65625-1.0312 1.3594-1.0312.71875 0 1.3594.51562 1.3594 1.2344 0 .57812-.39062 1.0469-.98438 1.3906zm1.4531.95312c.71875-.375 1.2031-.89062 1.2031-1.5469 0-.92188-.875-1.4844-1.7812-1.4844-1 0-1.8125.73438-1.8125 1.6719 0 .17188.015625.625.4375 1.0938.10938.10938.48438.35938.73438.53125-.57812.29688-1.4375.84375-1.4375 1.8438 0 1.0469 1.0156 1.7188 2.0625 1.7188 1.125 0 2.0781-.82812 2.0781-1.8906 0-.35938-.10938-.8125-.5-1.2344-.1875-.20312-.34375-.29688-.98438-.70312zm-1 .42188 1.2344.78125c.28125.1875.75.48438.75 1.0938 0 .73438-.75 1.25-1.5625 1.25-.85938 0-1.5781-.60938-1.5781-1.4375 0-.57812.3125-1.2188 1.1562-1.6875z"/></symbol><symbol id="symbol928" overflow="visible"><path d="m4.4688-2c0-1.1875-.8125-2.1875-1.8906-2.1875-.46875 0-.90625.15625-1.2656.51562v-1.9531c.20312.0625.53125.125.84375.125 1.2344 0 1.9375-.90625 1.9375-1.0312 0-.0625-.03125-.10938-.10938-.10938 0 0-.03125 0-.078125.03125-.20312.09375-.6875.29688-1.3594.29688-.39062 0-.85938-.078125-1.3281-.28125-.078125-.03125-.09375-.03125-.10938-.03125-.10938 0-.10938.078125-.10938.23438v2.9531c0 .17188 0 .25.14062.25.078125 0 .09375-.015625.14062-.078125.10938-.15625.46875-.70312 1.2812-.70312.51562 0 .76562.45312.84375.64062.15625.375.1875.75.1875 1.25 0 .35938 0 .95312-.25 1.375-.23438.39062-.60938.64062-1.0625.64062-.71875 0-1.2969-.53125-1.4688-1.1094.03125 0 .0625.015625.17188.015625.32812 0 .5-.25.5-.48438 0-.25-.17188-.5-.5-.5-.14062 0-.48438.078125-.48438.53125 0 .85938.6875 1.8281 1.7969 1.8281 1.1562 0 2.1719-.95312 2.1719-2.2188z"/></symbol><symbol id="symbol188" overflow="visible"><path d="m6.5625-2.2969c.17188 0 .35938 0 .35938-.20312 0-.1875-.1875-.1875-.35938-.1875h-5.3906c-.17188 0-.34375 0-.34375.1875 0 .20312.17188.20312.34375.20312z"/></symbol><symbol id="symbol6132" overflow="visible"><path d="m3.3281-3.0156c.0625-.25.29688-1.1719.98438-1.1719.046875 0 .29688 0 .5.125-.28125.0625-.46875.29688-.46875.54688 0 .15625.10938.34375.375.34375.21875 0 .53125-.17188.53125-.57812 0-.51562-.57812-.65625-.92188-.65625-.57812 0-.92188.53125-1.0469.75-.25-.65625-.78125-.75-1.0781-.75-1.0312 0-1.6094 1.2812-1.6094 1.5312 0 .10938.10938.10938.125.10938.078125 0 .10938-.03125.125-.10938.34375-1.0625 1-1.3125 1.3438-1.3125.1875 0 .53125.09375.53125.67188 0 .3125-.17188.96875-.53125 2.375-.15625.60938-.51562 1.0312-.95312 1.0312-.0625 0-.28125 0-.5-.125.25-.0625.46875-.26562.46875-.54688 0-.26562-.21875-.34375-.35938-.34375-.3125 0-.54688.25-.54688.57812 0 .45312.48438.65625.92188.65625.67188 0 1.0312-.70312 1.0469-.75.125.35938.48438.75 1.0781.75 1.0312 0 1.5938-1.2812 1.5938-1.5312 0-.10938-.078125-.10938-.10938-.10938-.09375 0-.10938.046875-.14062.10938-.32812 1.0781-1 1.3125-1.3125 1.3125-.39062 0-.54688-.3125-.54688-.65625 0-.21875.046875-.4375.15625-.875z"/></symbol><symbol id="symbol916" overflow="visible"><path d="m6.9844 23.422c0-.04687-.03125-.0625-.046875-.09375-.375-.375-1.0312-1.0312-1.7031-2.1094-1.6094-2.5781-2.3281-5.8125-2.3281-9.6562 0-2.6875.35938-6.1406 2-9.1094.78125-1.4219 1.6094-2.2344 2.0469-2.6719.03125-.03125.03125-.046875.03125-.078125 0-.10938-.078125-.10938-.21875-.10938s-.15625 0-.3125.15625c-3.3281 3.0469-4.375 7.6094-4.375 11.797 0 3.9219.89062 7.875 3.4219 10.859.20312.21875.57812.625.98438.98438.125.125.14062.125.28125.125s.21875 0 .21875-.09375z"/></symbol><symbol id="symbol6814" overflow="visible"><path d="m5.25 11.562c0-3.9219-.89062-7.8594-3.4219-10.844-.20312-.23438-.57812-.64062-.98438-1-.125-.125-.14062-.125-.28125-.125-.125 0-.21875 0-.21875.10938 0 .03125.046875.078125.0625.09375.34375.35938 1.0156 1.0312 1.6875 2.1094 1.6094 2.5625 2.3281 5.8125 2.3281 9.6406 0 2.6875-.35938 6.1406-2 9.125-.78125 1.4062-1.6094 2.2344-2.0312 2.6562-.015625.03125-.046875.0625-.046875.09375 0 .09375.09375.09375.21875.09375.14062 0 .15625 0 .3125-.15625 3.3281-3.0312 4.375-7.5938 4.375-11.797z"/></symbol><symbol id="symbol9786" overflow="visible"><path d="m4.6406 21.547-2.1562-9.9844-1.3125 2.0625c-.0625.07813-.0625.10938-.0625.10938 0 .04687.125.15625.14062.15625l.67188-1.0625 2.3125 10.703c.32812 0 .34375 0 .40625-.26562l5.4844-23.25c.01563-.078125.04687-.17188.04687-.21875 0-.10938-.07813-.20312-.20312-.20312-.15625 0-.1875.14062-.21875.28125z"/></symbol><symbol id="symbol8501" overflow="visible"><path d="m4.4688-2c0-1.1875-.8125-2.1875-1.8906-2.1875-.46875 0-.90625.15625-1.2656.51562v-1.9531c.20312.0625.53125.125.84375.125 1.2344 0 1.9375-.90625 1.9375-1.0312 0-.0625-.03125-.10938-.10938-.10938 0 0-.03125 0-.078125.03125-.20312.09375-.6875.29688-1.3594.29688-.39062 0-.85938-.078125-1.3281-.28125-.078125-.03125-.09375-.03125-.10938-.03125-.10938 0-.10938.078125-.10938.23438v2.9531c0 .17188 0 .25.14062.25.078125 0 .09375-.015625.14062-.078125.10938-.15625.46875-.70312 1.2812-.70312.51562 0 .76562.45312.84375.64062.15625.375.1875.75.1875 1.25 0 .35938 0 .95312-.25 1.375-.23438.39062-.60938.64062-1.0625.64062-.71875 0-1.2969-.53125-1.4688-1.1094.03125 0 .0625.015625.17188.015625.32812 0 .5-.25.5-.48438 0-.25-.17188-.5-.5-.5-.14062 0-.48438.078125-.48438.53125 0 .85938.6875 1.8281 1.7969 1.8281 1.1562 0 2.1719-.95312 2.1719-2.2188z"/></symbol><symbol id="symbol6047" overflow="visible"><path d="m2.9375-6.375c0-.25 0-.26562-.23438-.26562-.625.64062-1.5.64062-1.8125.64062v.3125c.20312 0 .78125 0 1.2969-.26562v5.1719c0 .35938-.03125.46875-.92188.46875h-.3125v.3125c.34375-.03125 1.2031-.03125 1.6094-.03125.39062 0 1.2656 0 1.6094.03125v-.3125h-.3125c-.90625 0-.92188-.10938-.92188-.46875z"/></symbol><symbol id="symbol694" overflow="visible"><path d="m2.9375-1.6406v.85938c0 .35938-.03125.46875-.76562.46875h-.20312v.3125c.40625-.03125.92188-.03125 1.3438-.03125s.9375 0 1.3594.03125v-.3125h-.21875c-.73438 0-.75-.10938-.75-.46875v-.85938h.98438v-.3125h-.98438v-4.5312c0-.20312 0-.26562-.17188-.26562-.078125 0-.10938 0-.1875.125l-3.0625 4.6719v.3125zm.046875-.3125h-2.4219l2.4219-3.7188z"/></symbol><symbol id="symbol1712" overflow="visible"><path d="m4.0781-2.2969h2.7812c.14062 0 .32812 0 .32812-.20312 0-.1875-.1875-.1875-.32812-.1875h-2.7812v-2.7969c0-.14062 0-.32812-.20312-.32812s-.20312.1875-.20312.32812v2.7969h-2.7812c-.14062 0-.32812 0-.32812.1875 0 .20312.1875.20312.32812.20312h2.7812v2.7969c0 .14062 0 .32812.20312.32812s.20312-.1875.20312-.32812z"/></symbol><symbol id="symbol8726" overflow="visible"><path d="m6.8438-3.2656c.15625 0 .34375 0 .34375-.1875 0-.20312-.1875-.20312-.32812-.20312h-5.9688c-.14062 0-.32812 0-.32812.20312 0 .1875.1875.1875.32812.1875zm.015625 1.9375c.14062 0 .32812 0 .32812-.20312 0-.1875-.1875-.1875-.34375-.1875h-5.9531c-.14062 0-.32812 0-.32812.1875 0 .20312.1875.20312.32812.20312z"/></symbol><symbol id="symbol1813" overflow="visible"><path d="m4.75-6.0781c.078125-.10938.078125-.125.078125-.34375h-2.4219c-1.2031 0-1.2344-.125-1.2656-.3125h-.25l-.32812 2.0469h.25c.03125-.15625.10938-.78125.25-.90625.0625-.0625.84375-.0625.96875-.0625h2.0625c-.10938.15625-.89062 1.25-1.1094 1.5781-.90625 1.3438-1.2344 2.7344-1.2344 3.75 0 .09375 0 .54688.46875.54688.45312 0 .45312-.45312.45312-.54688v-.51562c0-.54688.03125-1.0938.10938-1.625.046875-.23438.17188-1.0938.625-1.7031z"/></symbol><symbol id="symbol8225" overflow="visible"><path d="m2.8906-3.5156c.8125-.26562 1.3906-.95312 1.3906-1.75 0-.8125-.875-1.375-1.8281-1.375-1 0-1.7656.59375-1.7656 1.3594 0 .32812.21875.51562.51562.51562s.5-.21875.5-.51562c0-.48438-.46875-.48438-.60938-.48438.29688-.5.95312-.625 1.3125-.625.42188 0 .96875.21875.96875 1.1094 0 .125-.03125.70312-.28125 1.1406-.29688.48438-.64062.51562-.89062.51562-.078125.015625-.3125.03125-.39062.03125-.078125.015625-.14062.03125-.14062.125 0 .10938.0625.10938.23438.10938h.4375c.8125 0 1.1875.67188 1.1875 1.6562 0 1.3594-.6875 1.6406-1.125 1.6406s-1.1875-.17188-1.5312-.75c.34375.046875.65625-.17188.65625-.54688 0-.35938-.26562-.5625-.54688-.5625-.25 0-.5625.14062-.5625.57812 0 .90625.92188 1.5625 2.0156 1.5625 1.2188 0 2.125-.90625 2.125-1.9219 0-.8125-.64062-1.5938-1.6719-1.8125z"/></symbol><symbol id="symbol9902" overflow="visible"><path d="m3.6562-3.1719v.32812c0 2.3281-1.0312 2.7812-1.6094 2.7812-.17188 0-.71875-.015625-.98438-.35938.4375 0 .51562-.28125.51562-.45312 0-.3125-.23438-.45312-.45312-.45312-.15625 0-.45312.078125-.45312.46875 0 .67188.53125 1.0781 1.375 1.0781 1.2969 0 2.5156-1.3594 2.5156-3.5 0-2.6875-1.1562-3.3594-2.0469-3.3594-.54688 0-1.0312.1875-1.4531.625-.42188.45312-.64062.875-.64062 1.625 0 1.2344.875 2.2188 1.9844 2.2188.60938 0 1.0156-.42188 1.25-1zm-1.2344.76562c-.15625 0-.625 0-.92188-.625-.1875-.375-.1875-.85938-.1875-1.3594 0-.53125 0-1 .21875-1.375.26562-.5.64062-.625.98438-.625.46875 0 .79688.34375.96875.78125.10938.32812.15625.95312.15625 1.4062 0 .82812-.34375 1.7969-1.2188 1.7969z"/></symbol><symbol id="symbol6086" overflow="visible"><path d="m1.3125-3.2656v-.25c0-2.5156 1.2344-2.875 1.75-2.875.23438 0 .65625.0625.875.40625-.15625 0-.54688 0-.54688.4375 0 .3125.23438.46875.45312.46875.15625 0 .46875-.09375.46875-.48438 0-.59375-.4375-1.0781-1.2656-1.0781-1.2812 0-2.625 1.2812-2.625 3.4844 0 2.6719 1.1562 3.375 2.0781 3.375 1.1094 0 2.0625-.9375 2.0625-2.25 0-1.2656-.89062-2.2188-2-2.2188-.67188 0-1.0469.5-1.25.98438zm1.1875 3.2031c-.625 0-.92188-.59375-.98438-.75-.1875-.46875-.1875-1.2656-.1875-1.4375 0-.78125.32812-1.7812 1.2188-1.7812.17188 0 .625 0 .9375.625.17188.35938.17188.875.17188 1.3594s0 .98438-.17188 1.3438c-.29688.59375-.75.64062-.98438.64062z"/></symbol><symbol id="symbol8246" overflow="visible"><path d="m3.5156-1.2656h-.23438c-.015625.15625-.09375.5625-.1875.625-.046875.046875-.57812.046875-.6875.046875h-1.2812c.73438-.64062.98438-.84375 1.3906-1.1719.51562-.40625 1-.84375 1-1.5 0-.84375-.73438-1.3594-1.625-1.3594-.85938 0-1.4531.60938-1.4531 1.25 0 .34375.29688.39062.375.39062.15625 0 .35938-.125.35938-.375 0-.125-.046875-.375-.40625-.375.21875-.48438.6875-.64062 1.0156-.64062.70312 0 1.0625.54688 1.0625 1.1094 0 .60938-.4375 1.0781-.65625 1.3281l-1.6719 1.6719c-.078125.0625-.078125.078125-.078125.26562h2.875z"/></symbol><symbol id="symbol1870" overflow="visible"><path d="m4.8438-3.7969c.046875-.14062.046875-.15625.046875-.23438 0-.17188-.14062-.26562-.29688-.26562-.09375 0-.25.0625-.34375.20312-.015625.0625-.10938.35938-.14062.54688-.078125.25-.14062.53125-.20312.79688l-.45312 1.7969c-.03125.14062-.46875.84375-1.125.84375-.5 0-.60938-.4375-.60938-.8125 0-.45312.17188-1.0781.5-1.9531.15625-.40625.20312-.51562.20312-.71875 0-.4375-.3125-.8125-.8125-.8125-.95312 0-1.3125 1.4531-1.3125 1.5312 0 .10938.09375.10938.10938.10938.10938 0 .10938-.03125.15625-.1875.28125-.9375.67188-1.2344 1.0156-1.2344.078125 0 .25 0 .25.3125 0 .25-.10938.51562-.17188.70312-.40625 1.0625-.57812 1.625-.57812 2.0938 0 .89062.625 1.1875 1.2188 1.1875.39062 0 .71875-.17188 1-.45312-.125.51562-.25 1.0156-.64062 1.5469-.26562.32812-.64062.625-1.0938.625-.14062 0-.59375-.03125-.76562-.42188.15625 0 .29688 0 .42188-.125.10938-.078125.20312-.21875.20312-.40625 0-.3125-.26562-.34375-.35938-.34375-.23438 0-.5625.15625-.5625.64062 0 .5.4375.875 1.0625.875 1.0156 0 2.0469-.90625 2.3281-2.0312z"/></symbol><symbol id="symbol3613" overflow="visible"><path d="m3.875 8.5156-1.75-3.875c-.078125-.15625-.125-.15625-.15625-.15625 0 0-.0625 0-.17188.078125l-.9375.71875c-.125.10938-.125.125-.125.15625 0 .0625.015625.10938.09375.10938.0625 0 .23438-.14062.34375-.21875.046875-.046875.20312-.15625.3125-.23438l1.9688 4.3125c.0625.15625.10938.15625.20312.15625.15625 0 .1875-.046875.25-.1875l4.5312-9.375c.0625-.14062.0625-.17188.0625-.20312 0-.09375-.078125-.20312-.20312-.20312-.078125 0-.14062.0625-.21875.21875z"/></symbol></defs><path d="m-8.5561-5.6 5.3728-1.8585 2.1491 1.8585z" fill="#fde7e7" fill-rule="evenodd" stop-color="#000000" style="font-variation-settings:normal"/><g fill="none"><path d="m30.128-24.185-1.0746 5.5755-5.3728 1.8585-4.2982-3.717m10.746-3.717 5.3728-1.8585m-16.118 5.5755-5.3728 1.8585-4.2982-3.717m32.237 14.868 2.1491-11.151m-2.1491 11.151-5.3728 1.8585-4.2982-3.717 1.0746-5.5755 10.746-3.717-8.5965-7.434m-2.1491 11.151-4.2982-3.717m-44.057-5.5755-1.0746 5.5755-5.3728 1.8585-4.2982-3.717m10.746-3.717 5.3728-1.8585m19.342 3.717-10.746 3.717m8.5965 7.434-1.0746 5.5755-5.3728 1.8585-4.2982-3.717 2.1491-11.151 8.5965 7.434 5.3728-1.8585 1.0746-5.5755m-17.193 11.151-5.3728 1.8585-4.2982-3.717 1.0746-5.5755 10.746-3.717-8.5965-7.434m-2.1491 11.151-4.2982-3.717m48.355 9.2926-10.746 3.717 2.1491-11.151m6.4474 18.585-1.0746 5.5755-5.3728 1.8585-4.2982-3.717 2.1491-11.151 8.5965 7.434 5.3728-1.8585 1.0746-5.5755m-17.193 11.151-5.3728 1.8585-4.2982-3.717 1.0746-5.5755 10.746-3.717-8.5965-7.434m-2.1491 11.151-4.2982-3.717m25.79 22.302 1.0746-5.5755 10.746-3.717-8.5965-7.434m-2.1491 11.151-4.2982-3.717m-41.908-16.727-10.746 3.717 2.1491-11.151m6.4474 18.585-1.0746 5.5755-5.3728 1.8585-4.2982-3.717 2.1491-11.151 8.5965 7.434 5.3728-1.8585 1.0746-5.5755m-17.193 11.151 2.1491-11.151m33.311 9.2926-10.746 3.717 2.1491-11.151m6.4474 18.585-8.5965-7.434 8.5965 7.434 5.3728-1.8585 1.0746-5.5755m-25.79 3.717 10.746-3.717-8.5965-7.434m-2.1491 11.151-4.2982-3.717" stop-color="#000000" stroke="#ccc" stroke-width=".2" style="font-variation-settings:normal"/><path d="m-8.5561-5.6h15.044l7.5219 13.01-7.5219 13.01h-15.044l-7.5219-13.01z" stop-color="#000000" stroke="#000" stroke-width=".02" style="font-variation-settings:normal"/><path d="m-8.5561-5.6 5.3728-1.8585 4.2982 3.717" stop-color="#000000" stroke="#000" stroke-width=".05" style="font-variation-settings:normal"/></g><g><text transform="matrix(1.9508 0 0 1.9511 -87.673 -68.846)" x="41.804127" y="31.804127" dominant-baseline="auto" fill="#000000" font-family="'Work Sans'" font-size=".66667px" letter-spacing="0px" stop-color="#000000" stroke-width="2.5629" text-align="center" text-anchor="middle" word-spacing="0px" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;font-variation-settings:normal;inline-size:0;line-height:100%;paint-order:stroke fill markers;shape-margin:0;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal" xml:space="preserve"><tspan x="41.804127" y="31.804127" stroke-width="2.5629">s</tspan></text><text transform="matrix(1.4944 1.2539 -1.2541 1.4946 -24.414 -106.49)" x="41.804127" y="31.804127" dominant-baseline="auto" fill="#000000" font-family="'Work Sans'" font-size=".34172px" letter-spacing="0px" stop-color="#000000" stroke-width="2.5629" text-align="center" text-anchor="middle" word-spacing="0px" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;font-variation-settings:normal;inline-size:0;line-height:100%;paint-order:stroke fill markers;shape-margin:0;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal" xml:space="preserve"><tspan x="41.804127" y="31.804127" font-size=".34172px" stroke-width="2.5629">s/2</tspan></text><circle cx="-1.0342" cy="-5.6" r=".2" fill-rule="evenodd" stop-color="#000000" style="font-variation-settings:normal"/><text transform="matrix(1.9508 0 0 1.9511 -81.521 -67.928)" x="41.804127" y="31.804127" dominant-baseline="auto" fill="#000000" font-family="'Work Sans'" font-size=".33333px" letter-spacing="0px" stop-color="#000000" stroke-width="2.5629" text-align="center" text-anchor="middle" word-spacing="0px" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;font-variation-settings:normal;inline-size:0;line-height:100%;paint-order:stroke fill markers;shape-margin:0;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal" xml:space="preserve"><tspan x="41.804127" y="31.804127" stroke-width="2.5629">(½, 0)</tspan></text></g><path d="m-3.1833-7.4585v1.8585h-5.3728" fill="none" stop-color="#000000" stroke="#000" stroke-width=".05" style="font-variation-settings:normal"/><g fill="#000000" font-family="'Work Sans'" letter-spacing="0px" text-anchor="middle" word-spacing="0px"><text transform="scale(.99992 1.0001)" x="-3.3621588" y="-6.8720508" font-size=".4px" stop-color="#000000" stroke="#fbfbfb" stroke-linejoin="round" stroke-width=".2" text-align="center" style="line-height:100%;paint-order:stroke fill markers;text-decoration-color:#000000;text-decoration-line:none" xml:space="preserve"><tspan x="-3.3621588" y="-6.8720508" font-size=".4px" stroke="#fbfbfb" stroke-linejoin="round" stroke-width=".2" style="paint-order:stroke fill markers">120°</tspan></text><text transform="matrix(1.9508 0 0 1.9511 -87.406 -67.189)" x="41.804127" y="31.804127" dominant-baseline="auto" font-size=".34172px" stop-color="#000000" stroke-width="2.5629" text-align="center" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;font-variation-settings:normal;inline-size:0;line-height:100%;paint-order:stroke fill markers;shape-margin:0;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal" xml:space="preserve"><tspan x="41.804127" y="31.804127" dominant-baseline="auto" fill="#000000" font-family="'Work Sans'" font-size=".34172px" letter-spacing="0px" stop-color="#000000" stroke-width="2.5629" text-align="center" text-anchor="middle" word-spacing="0px" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;font-variation-settings:normal;inline-size:0;line-height:100%;paint-order:stroke fill markers;shape-margin:0;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal">x</tspan></text><text transform="matrix(1.9508 0 0 1.9511 -84.99 -68.222)" x="41.804127" y="31.804127" dominant-baseline="auto" font-size=".34172px" stop-color="#000000" stroke-width="2.5629" text-align="center" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;font-variation-settings:normal;inline-size:0;line-height:100%;paint-order:stroke fill markers;shape-margin:0;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal" xml:space="preserve"><tspan x="41.804127" y="31.804127" font-size=".34172px" stroke-width="2.5629">y</tspan></text></g><g transform="translate(-73.603 -48.899)"><rect x="75.997" y="38.668" width="31.617" height="12.671" fill="#fff" fill-opacity=".8" fill-rule="evenodd" stop-color="#000000" stroke="#000" stroke-width=".038083" style="font-variation-settings:normal"/><g transform="translate(.4)"><text transform="translate(.41154 -.34286)" x="76.659508" y="40.51767" dominant-baseline="auto" fill="#000000" font-family="'Work Sans'" font-size=".66667px" letter-spacing="0px" stop-color="#000000" stroke-width="5" text-anchor="start" word-spacing="0px" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;font-variation-settings:normal;inline-size:0;line-height:100%;paint-order:stroke fill markers;shape-margin:0;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal" xml:space="preserve"><tspan x="76.659508" y="40.51767">Using cosine rule on red triangle:</tspan></text><g transform="matrix(.05 0 0 .05 67.355 36.041)"><g><use x="224.933" y="96.348" width="100%" height="100%" xlink:href="#symbol7125"/><use x="233.46201" y="103.655" width="100%" height="100%" xlink:href="#symbol699"/></g><path transform="matrix(1 0 0 -1 233.46 107.9)" d="m-.0010625-.00125h4.9805" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="233.46201" y="117.229" width="100%" height="100%" xlink:href="#symbol6191"/><use x="239.63901" y="96.348" width="100%" height="100%" xlink:href="#symbol6155"/><use x="246.97301" y="98.412003" width="100%" height="100%" xlink:href="#symbol2641"/><use x="254.21001" y="110.395" width="100%" height="100%" xlink:href="#symbol7217"/><use x="264.72601" y="110.395" width="100%" height="100%" xlink:href="#symbol8254"/><use x="269.396" y="106.282" width="100%" height="100%" xlink:href="#symbol2641"/><use x="276.07901" y="110.395" width="100%" height="100%" xlink:href="#symbol7071"/><use x="286.04199" y="99.336998" width="100%" height="100%" xlink:href="#symbol47"/><use x="293.34299" y="103.655" width="100%" height="100%" xlink:href="#symbol8254"/></g><path transform="matrix(1 0 0 -1 293.19 107.9)" d="m5e-4-.00125h4.9805" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="293.18701" y="117.229" width="100%" height="100%" xlink:href="#symbol6191"/><use x="299.36401" y="99.336998" width="100%" height="100%" xlink:href="#symbol4999"/><use x="305.314" y="101.401" width="100%" height="100%" xlink:href="#symbol2641"/><use x="311.99701" y="110.395" width="100%" height="100%" xlink:href="#symbol9623"/><use x="321.95999" y="110.395" width="100%" height="100%" xlink:href="#symbol6191"/><use x="326.94101" y="110.395" width="100%" height="100%" xlink:href="#symbol8254"/><use x="333.271" y="99.336998" width="100%" height="100%" xlink:href="#symbol47"/><use x="340.57199" y="103.655" width="100%" height="100%" xlink:href="#symbol8254"/></g><path transform="matrix(1 0 0 -1 340.42 107.9)" d="m.00096875-.00125h4.9805" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="340.41699" y="117.229" width="100%" height="100%" xlink:href="#symbol6191"/><use x="346.59399" y="99.336998" width="100%" height="100%" xlink:href="#symbol4999"/><use x="354.20401" y="110.395" width="100%" height="100%" xlink:href="#symbol1612"/><use x="358.63138" y="110.395" width="100%" height="100%" xlink:href="#symbol2470"/><use x="363.61267" y="110.395" width="100%" height="100%" xlink:href="#symbol3064"/><use x="369.20569" y="110.395" width="100%" height="100%" xlink:href="#symbol699"/><use x="374.18698" y="110.395" width="100%" height="100%" xlink:href="#symbol6191"/><use x="379.16827" y="110.395" width="100%" height="100%" xlink:href="#symbol5439"/><use x="384.147" y="106.282" width="100%" height="100%" xlink:href="#symbol8680"/><use x="224.468" y="129.269" width="100%" height="100%" xlink:href="#symbol699"/></g><path transform="matrix(1 0 0 -1 224.47 133.52)" d="m.00075-.0015312h4.9805" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="224.468" y="142.843" width="100%" height="100%" xlink:href="#symbol5061"/><use x="233.412" y="136.009" width="100%" height="100%" xlink:href="#symbol7217"/><use x="245.12399" y="129.269" width="100%" height="100%" xlink:href="#symbol2078"/></g><path transform="matrix(1 0 0 -1 245.12 133.52)" d="m.001-.0015312h4.9805" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="245.12399" y="142.843" width="100%" height="100%" xlink:href="#symbol5061"/><use x="251.30099" y="136.009" width="100%" height="100%" xlink:href="#symbol8254"/><use x="255.97099" y="131.895" width="100%" height="100%" xlink:href="#symbol2641"/><use x="262.65399" y="136.009" width="100%" height="100%" xlink:href="#symbol7071"/><use x="273.81201" y="129.269" width="100%" height="100%" xlink:href="#symbol699"/></g><path transform="matrix(1 0 0 -1 273.81 133.52)" d="m5e-4-.0015312h4.9805" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="273.81201" y="142.843" width="100%" height="100%" xlink:href="#symbol6191"/><use x="279.98901" y="136.009" width="100%" height="100%" xlink:href="#symbol8254"/><use x="284.659" y="131.895" width="100%" height="100%" xlink:href="#symbol2641"/><use x="223.27299" y="158.992" width="100%" height="100%" xlink:href="#symbol8254"/><use x="230.71001" y="158.992" width="100%" height="100%" xlink:href="#symbol7217"/><use x="246.573" y="152.252" width="100%" height="100%" xlink:href="#symbol699"/></g><path transform="matrix(1 0 0 -1 242.42 156.5)" d="m-.000125.001h13.285" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="242.422" y="158.69299" width="100%" height="100%" xlink:href="#symbol5098"/></g><path transform="matrix(1 0 0 -1 250.72 158.49)" d="m-.0013438.0008125h4.9805" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="250.724" y="166.93401" width="100%" height="100%" xlink:href="#symbol3266"/></g></g><g transform="translate(0 -6.0107)"><text transform="translate(16.212 5.6571)" x="76.659508" y="40.51767" dominant-baseline="auto" fill="#000000" font-family="'Work Sans'" font-size=".66667px" letter-spacing="0px" stop-color="#000000" stroke-width="5" text-anchor="start" word-spacing="0px" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;font-variation-settings:normal;inline-size:0;line-height:100%;paint-order:stroke fill markers;shape-margin:0;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal" xml:space="preserve"><tspan x="76.659508" y="40.51767">Subtracting first from second equation:</tspan></text><text transform="translate(16.212 9.8571)" x="76.659508" y="40.51767" dominant-baseline="auto" fill="#000000" font-family="'Work Sans'" font-size=".66667px" letter-spacing="0px" stop-color="#000000" stroke-width="5" text-anchor="start" word-spacing="0px" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;font-variation-settings:normal;inline-size:0;line-height:100%;paint-order:stroke fill markers;shape-margin:0;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal" xml:space="preserve"><tspan x="76.659508" y="40.51767">Substituting x into the first equation:</tspan></text><g transform="matrix(.05 0 0 .05 80.455 42.056)"><g><use x="277.88101" y="100.338" width="100%" height="100%" xlink:href="#symbol5562"/></g><path transform="matrix(1 0 0 -1 277.88 104.59)" d="m.0018125-.0018438h4.9805" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="277.88101" y="113.912" width="100%" height="100%" xlink:href="#symbol4770"/><use x="286.272" y="107.078" width="100%" height="100%" xlink:href="#symbol188"/><use x="296.23499" y="107.078" width="100%" height="100%" xlink:href="#symbol6132"/><use x="304.69601" y="107.078" width="100%" height="100%" xlink:href="#symbol7919"/><use x="315.21201" y="107.078" width="100%" height="100%" xlink:href="#symbol188"/><use x="326.647" y="100.338" width="100%" height="100%" xlink:href="#symbol5544"/></g><path transform="matrix(1 0 0 -1 324.16 104.59)" d="m.00025-.0018438h9.9609" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="324.15601" y="113.912" width="100%" height="100%" xlink:href="#symbol76"/><use x="329.1373" y="113.912" width="100%" height="100%" xlink:href="#symbol2596"/><use x="276.686" y="130.061" width="100%" height="100%" xlink:href="#symbol6132"/><use x="285.147" y="130.061" width="100%" height="100%" xlink:href="#symbol7919"/><use x="299.349" y="123.321" width="100%" height="100%" xlink:href="#symbol928"/></g><path transform="matrix(1 0 0 -1 296.86 127.57)" d="m.000375-.0003125h9.9609" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="296.85901" y="136.895" width="100%" height="100%" xlink:href="#symbol5562"/><use x="301.8403" y="136.895" width="100%" height="100%" xlink:href="#symbol4770"/></g></g><g transform="matrix(.05 0 0 .05 80.882 46.252)"><g><use x="269.81299" y="96.348" width="100%" height="100%" xlink:href="#symbol916"/><use x="280.83301" y="103.655" width="100%" height="100%" xlink:href="#symbol8501"/></g><path transform="matrix(1 0 0 -1 278.34 107.9)" d="m.00175-.00125h9.9609" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="278.34201" y="117.229" width="100%" height="100%" xlink:href="#symbol6047"/><use x="283.3233" y="117.229" width="100%" height="100%" xlink:href="#symbol694"/><use x="289.50101" y="96.348" width="100%" height="100%" xlink:href="#symbol6814"/><use x="296.83401" y="98.412003" width="100%" height="100%" xlink:href="#symbol8246"/><use x="303.517" y="110.395" width="100%" height="100%" xlink:href="#symbol1712"/><use x="313.48001" y="110.395" width="100%" height="100%" xlink:href="#symbol1870"/><use x="318.72198" y="106.282" width="100%" height="100%" xlink:href="#symbol8246"/><use x="325.95901" y="110.395" width="100%" height="100%" xlink:href="#symbol8726"/><use x="337.67001" y="103.655" width="100%" height="100%" xlink:href="#symbol6047"/></g><path transform="matrix(1 0 0 -1 337.67 107.9)" d="m.001875-.00125h4.9805" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="337.67001" y="117.229" width="100%" height="100%" xlink:href="#symbol1813"/><use x="268.15302" y="139.3" width="100%" height="100%" xlink:href="#symbol1870"/><use x="276.16199" y="139.3" width="100%" height="100%" xlink:href="#symbol8726"/><use x="286.67801" y="123.646" width="100%" height="100%" xlink:href="#symbol9786"/></g><path transform="matrix(1 0 0 -1 296.64 123.45)" d="m-.000375.0006875h17.336" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="302.81799" y="132.56" width="100%" height="100%" xlink:href="#symbol8225"/></g><path transform="matrix(1 0 0 -1 297.84 136.81)" d="m-6.25e-5.0014062h14.945" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="297.836" y="146.134" width="100%" height="100%" xlink:href="#symbol6047"/><use x="302.81729" y="146.134" width="100%" height="100%" xlink:href="#symbol9902"/><use x="307.79861" y="146.134" width="100%" height="100%" xlink:href="#symbol6086"/><use x="316.74301" y="139.3" width="100%" height="100%" xlink:href="#symbol8726"/><use x="328.45499" y="124.319" width="100%" height="100%" xlink:href="#symbol3613"/></g><path transform="matrix(1 0 0 -1 336.76 124.12)" d="m.0008125-.0010938h4.9805" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="336.75699" y="132.56" width="100%" height="100%" xlink:href="#symbol8225"/></g><path transform="matrix(1 0 0 -1 328.46 136.81)" d="m-.001875.0014062h13.285" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="330.11499" y="146.134" width="100%" height="100%" xlink:href="#symbol6047"/><use x="335.09631" y="146.134" width="100%" height="100%" xlink:href="#symbol694"/></g></g></g><g transform="translate(-15.805 5.3447)"><text transform="translate(16.212 -.34286)" x="76.659508" y="40.51767" dominant-baseline="auto" fill="#000000" font-family="'Work Sans'" font-size=".66667px" letter-spacing="0px" stop-color="#000000" stroke-width="5" text-anchor="start" word-spacing="0px" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;font-variation-settings:normal;inline-size:0;line-height:100%;paint-order:stroke fill markers;shape-margin:0;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal" xml:space="preserve"><tspan x="76.659508" y="40.51767">Left section of red triangle (Pythagoras):</tspan></text><text transform="translate(16.212 2.6571)" x="76.659508" y="40.51767" dominant-baseline="auto" fill="#000000" font-family="'Work Sans'" font-size=".66667px" letter-spacing="0px" stop-color="#000000" stroke-width="5" text-anchor="start" word-spacing="0px" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;font-variation-settings:normal;inline-size:0;line-height:100%;paint-order:stroke fill markers;shape-margin:0;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal" xml:space="preserve"><tspan x="76.659508" y="40.51767">Right section of red triangle (Pythagoras):</tspan></text><g transform="matrix(.05 0 0 .05 80.908 36.046)"><g><use x="268.435" y="107.078" width="100%" height="100%" xlink:href="#symbol6125"/><use x="274.129" y="102.965" width="100%" height="100%" xlink:href="#symbol8400"/><use x="280.81201" y="107.078" width="100%" height="100%" xlink:href="#symbol8844"/><use x="290.77499" y="107.078" width="100%" height="100%" xlink:href="#symbol1075"/><use x="296.017" y="102.965" width="100%" height="100%" xlink:href="#symbol8400"/><use x="303.254" y="107.078" width="100%" height="100%" xlink:href="#symbol6159"/><use x="313.76999" y="107.078" width="100%" height="100%" xlink:href="#symbol5184"/><use x="318.44" y="102.965" width="100%" height="100%" xlink:href="#symbol8400"/><use x="325.67599" y="107.078" width="100%" height="100%" xlink:href="#symbol6159"/><use x="337.388" y="100.338" width="100%" height="100%" xlink:href="#symbol6206"/></g><path transform="matrix(1 0 0 -1 337.39 104.59)" d="m-.0012812-.0018438h4.9805" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="337.388" y="113.912" width="100%" height="100%" xlink:href="#symbol7221"/></g></g><g transform="matrix(.05 0 0 .05 82.122 39.041)"><g><use x="242.366" y="96.348" width="100%" height="100%" xlink:href="#symbol2388"/><use x="250.895" y="103.655" width="100%" height="100%" xlink:href="#symbol1193"/></g><path transform="matrix(1 0 0 -1 250.9 107.9)" d="m-.00046875-.00125h4.9805" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="250.895" y="117.229" width="100%" height="100%" xlink:href="#symbol7367"/><use x="259.285" y="110.395" width="100%" height="100%" xlink:href="#symbol8924"/><use x="269.24799" y="110.395" width="100%" height="100%" xlink:href="#symbol4166"/><use x="274.94199" y="96.348" width="100%" height="100%" xlink:href="#symbol2620"/><use x="282.276" y="98.412003" width="100%" height="100%" xlink:href="#symbol806"/><use x="288.95901" y="110.395" width="100%" height="100%" xlink:href="#symbol5632"/><use x="298.92099" y="110.395" width="100%" height="100%" xlink:href="#symbol6888"/><use x="304.16299" y="106.282" width="100%" height="100%" xlink:href="#symbol806"/><use x="311.39999" y="110.395" width="100%" height="100%" xlink:href="#symbol2968"/><use x="321.91599" y="99.336998" width="100%" height="100%" xlink:href="#symbol997"/><use x="329.21701" y="103.655" width="100%" height="100%" xlink:href="#symbol1459"/></g><path transform="matrix(1 0 0 -1 329.06 107.9)" d="m5e-4-.00125h4.9805" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="329.06201" y="117.229" width="100%" height="100%" xlink:href="#symbol7367"/><use x="335.23801" y="99.336998" width="100%" height="100%" xlink:href="#symbol9132"/><use x="341.18799" y="101.401" width="100%" height="100%" xlink:href="#symbol806"/><use x="348.42499" y="110.395" width="100%" height="100%" xlink:href="#symbol2968"/><use x="362.62701" y="103.655" width="100%" height="100%" xlink:href="#symbol1193"/></g><path transform="matrix(1 0 0 -1 360.14 107.9)" d="m-.00028125-.00125h9.9648" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width=".398"/><g><use x="360.13699" y="117.229" width="100%" height="100%" xlink:href="#symbol7367"/><use x="365.11829" y="117.229" width="100%" height="100%" xlink:href="#symbol7949"/></g></g></g></g></g></svg></code></remarks>
/// <image type="raw">
/// <svg xmlns='http://www.w3.org/2000/svg' viewBox='-3.5 -3.5 7 7'><path d='M3.10714285714286
/// -3.15480682807188L3 -2.59807621135332L2.46428571428571 -2.41249933911379L2.03571428571429 -2.78365308359284L2.25
/// -3.89711431702997L3.10714285714286 -3.15480682807188L3.64285714285714 -3.34038370031141M2.03571428571429
/// -2.78365308359284L1.5 -2.59807621135332L1.07142857142857 -2.96922995583236L1.17857142857143 -3.52596057255093M3.75
/// -1.29903810567666L3.32142857142857 -1.6701918501557L3.42857142857143 -2.22692246687427L4.5
/// -2.59807621135332M3.42857142857143 -2.22692246687427L3 -2.59807621135332M-1.39285714285714 -3.15480682807188L-1.5
/// -2.59807621135332L-2.03571428571429 -2.41249933911379L-2.46428571428571 -2.78365308359284L-2.25
/// -3.89711431702997L-1.39285714285714 -3.15480682807188L-0.857142857142858 -3.34038370031141L-0.75
/// -3.89711431702997M-2.46428571428571 -2.78365308359284L-3 -2.59807621135332L-3.42857142857143
/// -2.96922995583236L-3.32142857142857 -3.52596057255093M1.07142857142857 -2.96922995583236L0
/// -2.59807621135332L0.214285714285714 -3.71153744479045M0.857142857142858 -1.85576872239522L0.75
/// -1.29903810567666L0.214285714285714 -1.11346123343713L-0.214285714285714 -1.48461497791618L0
/// -2.59807621135332L0.857142857142858 -1.85576872239522L1.39285714285714 -2.04134559463475L1.5
/// -2.59807621135332M-0.214285714285714 -1.48461497791618L-0.75 -1.29903810567666L-1.17857142857143
/// -1.6701918501557L-1.07142857142857 -2.22692246687427L0 -2.59807621135332L-0.857142857142858
/// -3.34038370031141M-1.07142857142857 -2.22692246687427L-1.5 -2.59807621135332M3.32142857142857
/// -1.6701918501557L2.25 -1.29903810567666L2.46428571428571 -2.41249933911379M3.10714285714286 -0.556730616718567L3
/// 8.32667268468867E-16L2.46428571428571 0.185576872239523L2.03571428571429 -0.185576872239524L2.25
/// -1.29903810567666L3.10714285714286 -0.556730616718567L3.64285714285714 -0.742307488958092M2.03571428571429
/// -0.185576872239524L1.5 0L1.07142857142857 -0.371153744479044L1.17857142857143 -0.927884361197613L2.25
/// -1.29903810567666L1.39285714285714 -2.04134559463475M1.17857142857143 -0.927884361197613L0.75
/// -1.29903810567666M3.75 1.29903810567666L3.32142857142857 0.927884361197614L3.42857142857143 0.371153744479045L4.5
/// 0M3.42857142857143 0.371153744479045L3 8.32667268468867E-16M-3.42857142857143 -2.96922995583236L-4.5
/// -2.59807621135332M-3 -2.59807621135332L-3.10714285714286 -2.04134559463475L-3.64285714285714
/// -1.85576872239522M-1.17857142857143 -1.6701918501557L-2.25 -1.29903810567666L-2.03571428571429
/// -2.41249933911379M-1.39285714285714 -0.556730616718567L-1.5 8.32667268468867E-16L-2.03571428571429
/// 0.185576872239523L-2.46428571428571 -0.185576872239524L-2.25 -1.29903810567666L-1.39285714285714
/// -0.556730616718567L-0.857142857142858 -0.742307488958092L-0.75 -1.29903810567666M-2.46428571428571
/// -0.185576872239524L-3 0L-3.42857142857143 -0.371153744479044L-3.32142857142857 -0.927884361197613L-2.25
/// -1.29903810567666L-3.10714285714286 -2.04134559463475M-3.32142857142857 -0.927884361197613L-3.75
/// -1.29903810567666M1.07142857142857 -0.371153744479044L0 0L0.214285714285714 -1.11346123343713M0.857142857142858
/// 0.742307488958091L0.75 1.29903810567666L0.214285714285714 1.48461497791618L-0.214285714285714 1.11346123343713L0
/// 0L0.857142857142858 0.742307488958091L1.39285714285714 0.556730616718566L1.5 0M-0.214285714285714
/// 1.11346123343713L-0.75 1.29903810567666L-1.17857142857143 0.927884361197614L-1.07142857142857 0.371153744479045L0
/// 0L-0.857142857142858 -0.742307488958092M-1.07142857142857 0.371153744479045L-1.5
/// 8.32667268468867E-16M3.32142857142857 0.927884361197614L2.25 1.29903810567666L2.46428571428571
/// 0.185576872239523M3.10714285714286 2.04134559463475L3 2.59807621135332L2.46428571428571
/// 2.78365308359284L2.03571428571429 2.41249933911379L2.25 1.29903810567666L3.10714285714286
/// 2.04134559463475L3.64285714285714 1.85576872239522M2.03571428571429 2.41249933911379L1.5
/// 2.59807621135332L1.07142857142857 2.22692246687427L1.17857142857143 1.6701918501557L2.25
/// 1.29903810567666L1.39285714285714 0.556730616718566M1.17857142857143 1.6701918501557L0.75
/// 1.29903810567666M3.32142857142857 3.52596057255093L3.42857142857143 2.96922995583236L4.5
/// 2.59807621135332M3.42857142857143 2.96922995583236L3 2.59807621135332M-3.42857142857143 -0.371153744479044L-4.5
/// 0M-3 0L-3.10714285714286 0.556730616718566L-3.64285714285714 0.742307488958091M-1.17857142857143
/// 0.927884361197614L-2.25 1.29903810567666L-2.03571428571429 0.185576872239523M-1.39285714285714
/// 2.04134559463475L-1.5 2.59807621135332L-2.03571428571429 2.78365308359284L-2.46428571428571 2.41249933911379L-2.25
/// 1.29903810567666L-1.39285714285714 2.04134559463475L-0.857142857142858 1.85576872239522L-0.75
/// 1.29903810567666M-2.46428571428571 2.41249933911379L-3 2.59807621135332L-3.42857142857143
/// 2.22692246687427L-3.32142857142857 1.6701918501557L-2.25 1.29903810567666L-3.10714285714286
/// 0.556730616718566M-3.32142857142857 1.6701918501557L-3.75 1.29903810567666M1.07142857142857 2.22692246687427L0
/// 2.59807621135332L0.214285714285714 1.48461497791618M1.5 2.59807621135332L1.39285714285714
/// 3.15480682807188L0.857142857142858 3.34038370031141L0 2.59807621135332L-0.214285714285714
/// 3.71153744479045M0.857142857142858 3.34038370031141L0.75 3.89711431702997M-1.17857142857143
/// 3.52596057255093L-1.07142857142857 2.96922995583236L0 2.59807621135332L-0.857142857142858
/// 1.85576872239522M-1.07142857142857 2.96922995583236L-1.5 2.59807621135332M1.39285714285714 3.15480682807188L2.25
/// 3.89711431702997L2.46428571428571 2.78365308359284M-3.42857142857143 2.22692246687427L-4.5 2.59807621135332M-3
/// 2.59807621135332L-3.10714285714286 3.15480682807188L-3.64285714285714 3.34038370031141M-3.10714285714286
/// 3.15480682807188L-2.25 3.89711431702997L-2.03571428571429 2.78365308359284' fill='none' stroke-width='.05'
/// stroke='black' /></svg></image>
public struct Floret : IEquatable<Floret>, INeighbor<Floret>, INeighbor<object>, IHasSvgGeometry
{
/// <summary>The underlying hex tile. This floret forms one sixth of that hexagon.</summary>
public Hex Hex { get; private set; }
/// <summary>Which of the florets within the hexagon this is.</summary>
public Position Pos { get; private set; }
/// <summary>
/// Constructor.</summary>
/// <param name="hex">
/// A hex tile to construct a floret from.</param>
/// <param name="pos">
/// Which of the florets within the hexagon to construct.</param>
public Floret(Hex hex, Position pos)
{
Hex = hex;
Pos = pos;
}
/// <summary>
/// Constructor.</summary>
/// <param name="q">
/// The Q coordinate of the hex tile to construct a floret from.</param>
/// <param name="r">
/// The R coordinate of the hex tile to construct a floret from.</param>
/// <param name="pos">
/// Which of the florets within the hexagon to construct.</param>
public Floret(int q, int r, Position pos)
{
Hex = new Hex(q, r);
Pos = pos;
}
/// <inheritdoc/>
public bool Equals(Floret other) => other.Hex.Equals(Hex) && other.Pos == Pos;
/// <inheritdoc/>
public override bool Equals(object obj) => obj is Floret other && other.Hex.Equals(Hex) && other.Pos == Pos;
/// <inheritdoc/>
public override int GetHashCode() => unchecked(Hex.GetHashCode() * 7 + (int) Pos);
/// <summary>Equality operator.</summary>
public static bool operator ==(Floret one, Floret two) => one.Equals(two);
/// <summary>Inequality operator.</summary>
public static bool operator !=(Floret one, Floret two) => !one.Equals(two);
/// <inheritdoc/>
public IEnumerable<Floret> Neighbors
{
get
{
yield return new Floret(Hex, (Position) (((int) Pos + 1) % 6));
yield return new Floret(Hex, (Position) (((int) Pos + 5) % 6));
yield return new Floret(Hex.Move((Hex.Direction) (((int) Pos + 1) % 6)), (Position) (((int) Pos + 2) % 6));
yield return new Floret(Hex.Move((Hex.Direction) (((int) Pos + 2) % 6)), (Position) (((int) Pos + 4) % 6));
yield return new Floret(Hex.Move((Hex.Direction) (((int) Pos + 2) % 6)), (Position) (((int) Pos + 3) % 6));
}
}
IEnumerable<object> INeighbor<object>.Neighbors => Neighbors.Cast<object>();
/// <inheritdoc/>
public IEnumerable<Link<Coordinates.Vertex>> Edges => Vertices.MakeEdges();
/// <summary>
/// Returns the vertices along the perimeter of this <see cref="Floret"/>, going clockwise from the “spiky” vertex
/// (center of <see cref="Hex"/>).</summary>
public Coordinates.Vertex[] Vertices => new Coordinates.Vertex[]
{
new Vertex(Hex, Vertex.Position.Center),
new Vertex(Hex, fullPos: 3 * (int) Pos + 1),
new Vertex(Hex, fullPos: 3 * (int) Pos + 2),
new Vertex(Hex, fullPos: 3 * (int) Pos + 3),
new Vertex(Hex, fullPos: 3 * (int) Pos + 4)
};
/// <inheritdoc/>
public PointD Center => Hex.Center * 3 + new PointD(0, -.9).Rotate(((int) Pos + 2d / 3) * Math.PI / 3);
private static readonly Position[] _floretPositions = (Position[]) Enum.GetValues(typeof(Position));
/// <summary>
/// Returns a collection of <see cref="Floret"/> tiles that form a larger hexagonal structure.</summary>
/// <param name="sideLength">
/// Side length of the hexagon structure to produce.</param>
public static IEnumerable<Floret> LargeHexagon(int sideLength) => Hex.LargeHexagon(sideLength).SelectMany(hex => _floretPositions.Select(pos => new Floret(hex, pos)));
/// <summary>Identifies one of the <see cref="Floret"/> cells that make up a hexagon.</summary>
public enum Position
{
/// <summary>The upper-right (1 o’clock) floret.</summary>
TopRight,
/// <summary>The right (3 o’clock) floret.</summary>
Right,
/// <summary>The lower-right (5 o’clock) floret.</summary>
BottomRight,
/// <summary>The lower-left (7 o’clock) floret.</summary>
BottomLeft,
/// <summary>The left (9 o’clock) floret.</summary>
Left,
/// <summary>The upper-left (11 o’clock) floret.</summary>
TopLeft
}
/// <inheritdoc/>
public override readonly string ToString() => $"F({Hex.Q},{Hex.R})/{(int) Pos}";
/// <summary>
/// Describes a grid structure consisting of <see cref="Floret"/> cells that join up in groups of 6 to form
/// hexagons, which in turn tile the plane.</summary>
public class Grid : Structure<Floret>
{
/// <summary>
/// See <see cref="Structure{TCell}.Structure(IEnumerable{TCell}, IEnumerable{Link{TCell}}, Func{TCell,
/// IEnumerable{TCell}})"/>.</summary>
public Grid(IEnumerable<Floret> cells, IEnumerable<Link<Floret>> links = null, Func<Floret, IEnumerable<Floret>> getNeighbors = null)
: base(cells, links, getNeighbors)
{
}
/// <summary>
/// Constructs a <see cref="Grid"/> consisting of a hexagonal grid of the specified <paramref
/// name="sideLength"/>.</summary>
public Grid(int sideLength) : base(LargeHexagon(sideLength))
{
}
/// <inheritdoc/>
protected override Structure<Floret> makeModifiedStructure(IEnumerable<Floret> cells, IEnumerable<Link<Floret>> traversible) => new Grid(cells, traversible);
/// <summary>See <see cref="Structure{TCell}.GenerateMaze(Random, MazeBias)"/>.</summary>
public new Grid GenerateMaze(Random rnd = null, MazeBias bias = MazeBias.Default) => (Grid) base.GenerateMaze(rnd, bias);
/// <summary>See <see cref="Structure{TCell}.GenerateMaze(Func{int, int, int}, MazeBias)"/>.</summary>
public new Grid GenerateMaze(Func<int, int, int> rndNext, MazeBias bias = MazeBias.Default) => (Grid) base.GenerateMaze(rndNext, bias);
}
/// <summary>Describes one of the vertices of a <see cref="Floret"/>.</summary>
public class Vertex : Coordinates.Vertex
{
/// <summary>The <see cref="Hex"/> tile that this <see cref="Vertex"/> is within.</summary>
public Hex Hex { get; private set; }
/// <summary>Which position within the <see cref="Hex"/> this vertex is.</summary>
public Position Pos { get; private set; }
/// <summary>Constructor.</summary>
public Vertex(Hex hex, Position pos)
{
Hex = hex;
Pos = pos;
}
/// <summary>
/// Constructs a <see cref="Vertex"/> from any position along the perimeter of <paramref name="hex"/>.</summary>
/// <param name="hex">
/// Hexagon to compute vertex from.</param>
/// <param name="fullPos">
/// Position of the vertex counting clockwise from the vertex that is above the hexagon’s top edge. Note that
/// numbers that are 1 modulo 3 yield vertices of the hexagon.</param>
/// <remarks>
/// Note that this constructor cannot construct a vertex that is at the center of a hexagon. Use <see
/// cref="Vertex(Hex, Position)"/> for that.</remarks>
public Vertex(Hex hex, int fullPos)
{
switch ((fullPos % 18 + 18) % 18)
{
case 8: Hex = hex.Move(Hex.Direction.Down); Pos = Position.TopRight; break;
case 9: Hex = hex.Move(Hex.Direction.Down); Pos = Position.TopRightMinus1; break;
case 10: Hex = hex.Move(Hex.Direction.Down); Pos = Position.TopLeftPlus1; break;
case 11: Hex = hex.Move(Hex.Direction.DownLeft); Pos = Position.Right; break;
case 12: Hex = hex.Move(Hex.Direction.DownLeft); Pos = Position.RightMinus1; break;
case 13: Hex = hex.Move(Hex.Direction.DownLeft); Pos = Position.TopRightPlus1; break;
case 14: Hex = hex.Move(Hex.Direction.DownLeft); Pos = Position.TopRight; break;
case 15: Hex = hex.Move(Hex.Direction.UpLeft); Pos = Position.BottomRightMinus1; break;
case 16: Hex = hex.Move(Hex.Direction.UpLeft); Pos = Position.RightPlus1; break;
case 17: Hex = hex.Move(Hex.Direction.UpLeft); Pos = Position.Right; break;
default: // <= 7
Pos = (Position) ((fullPos % 18 + 18) % 18);
Hex = hex;
break;
}
}
/// <summary>
/// Describes the position of a <see cref="Vertex"/> in relation to the vertices of its referenced <see
/// cref="Hex"/>.</summary>
public enum Position
{
/// <summary>The vertex one clockwise from the top-left vertex of the referenced <see cref="Hex"/>.</summary>
TopLeftPlus1,
/// <summary>The vertex one counter-clockwise from <see cref="TopRight"/>.</summary>
TopRightMinus1,
/// <summary>The top-right vertex of the referenced <see cref="Hex"/>.</summary>
TopRight,
/// <summary>The vertex one clockwise from <see cref="TopRight"/>.</summary>
TopRightPlus1,
/// <summary>The vertex one counter-clockwise from <see cref="Right"/>.</summary>
RightMinus1,
/// <summary>The right vertex of the referenced <see cref="Hex"/>.</summary>
Right,
/// <summary>The vertex one clockwise from <see cref="Right"/>.</summary>
RightPlus1,
/// <summary>
/// The vertex one counter-clockwise from the bottom-right vertex of the referenced <see cref="Hex"/>.</summary>
BottomRightMinus1,
/// <summary>The vertex at the center of the referenced <see cref="Hex"/>.</summary>
Center
}
private static readonly double[] xs = { -0.0714285714285714, 0.0714285714285714, 0.25, 0.392857142857143, 0.357142857142857, 0.5, 0.464285714285714, 0.285714285714286, 0 };
private static readonly double[] ys = { -0.494871659305394, -0.371153744479045, -0.433012701892219, -0.309294787065871, -0.123717914826348, 0, 0.185576872239522, 0.247435829652697, 0 };
/// <inheritdoc/>
public override PointD Point => new PointD((Hex.Q * .75 + xs[(int) Pos]) * 3, ((Hex.Q * .5 + Hex.R) * Hex.WidthToHeight + ys[(int) Pos]) * 3);
/// <inheritdoc/>
public override bool Equals(Coordinates.Vertex other) => other is Vertex kv && kv.Hex.Equals(Hex) && kv.Pos == Pos;
/// <inheritdoc/>
public override bool Equals(object obj) => obj is Vertex kv && kv.Hex.Equals(Hex) && kv.Pos == Pos;
/// <inheritdoc/>
public override int GetHashCode() => unchecked(Hex.GetHashCode() * 11 + (int) Pos);
}
}
}