/
appendxa.html
410 lines (410 loc) · 22.4 KB
/
appendxa.html
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
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
<!DOCTYPE html>
<html>
<head prefix="og: http://ogp.me/ns#">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Appendix: State and Transformation Reference | The Palenque Code</title>
<meta name="description" content="All states and transformations of the solution procedure collected on one page, with additional computer processable description files for each state.">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="css/styles.css">
<link rel="canonical" href="http://akusius.github.io/palenque/appendxa.html">
<meta property="og:locale" content="en_US">
<meta property="og:type" content="article">
<meta property="og:url" content="http://akusius.github.io/palenque/appendxa.html">
<meta property="og:title" content="Appendix: State and Transformation Reference | The Palenque Code">
<meta property="og:description" content="All states and transformations of the solution procedure collected on one page, with additional computer processable description files for each state.">
<meta property="og:image" content="http://akusius.github.io/palenque/media/social_logo.png">
<meta property="og:image:url" content="http://akusius.github.io/palenque/media/social_logo.png">
<meta name="twitter:card" content="summary">
<meta name="twitter:url" content="http://akusius.github.io/palenque/appendxa.html">
<meta name="twitter:title" content="Appendix: State and Transformation Reference | The Palenque Code">
<meta name="twitter:description" content="All states and transformations of the solution procedure collected on one page, with additional computer processable description files for each state.">
<meta name="twitter:image" content="http://akusius.github.io/palenque/media/social_logo.png">
<link rel="image_src" href="http://akusius.github.io/palenque/media/social_logo.png">
<script type="text/javascript" src="js/analytics.js"></script>
<script type="text/javascript" src="js/lib/jquery.min.js"></script>
<script type="text/javascript" src="js/toc.js"></script>
<style>
.state-txt {
font-size: .5em;
vertical-align: 0%;
}
</style>
</head>
<body>
<div id="header">
<h1><a href="./" title="Front page">The Palenque Code</a></h1>
<h2>Appendix: State and Transformation Reference</h2>
</div>
<div id="navigation">
<a href="#" accesskey="t" class="toc" title="Table of Contents (access key: T)">≡</a>
<a href="appagm.html" accesskey="p" class="prev" title="PalenqueAniGifMaker (Java Application)">←</a>
<a href="./" accesskey="u" class="up" title="The Palenque Code">↑</a>
<a href="author.html" accesskey="n" class="next" title="About the Author">→</a>
</div>
<div id="toc"></div>
<div id="content">
<p id="acba"><a class="anchor" href="#acba"></a>
In this appendix all states and transformations of the solution process
have been collected.
For each state, a computer processable file was generated (about its format see the <a href="#pqs-format">section at the bottom</a>), which is accessible
by clicking on the respective state number (all state files together in one compressed ZIP
can be downloaded <a href="media/appendxa/states/states.zip">here</a>).
For each transformation, the link defined on it references the step in the solution process, where
this operation was performed and described in detail.
</p>
<p id="state01"><a class="anchor" href="#state01"></a>
<a href="media/appendxa/states/state01.pqs" title="State file (PQS)">State #1</a>
<a href="media/appendxa/states/state01.pqs.txt" title="Same state file with TXT extension" class="state-txt">.TXT</a>
(<a href="step04.html#afab" title="Step 4: The Item Layout">initial layout</a>: 30 squares, 1 sun, 1 star):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/state01.png">
<img class="framed" src="media/appendxa/state01.png" alt="State #1">
</a>
</div>
<p id="transf01"><a class="anchor" href="#transf01"></a>
<a href="step05.html" title="Step 5: The Three Rotations">Transformation #1</a> (duplicate layer #1 and rotate it 90° clockwise):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/transf01.gif">
<img class="framed anim" src="media/appendxa/transf01.gif" alt="Transformation #1">
</a>
</div>
<p id="state02"><a class="anchor" href="#state02"></a>
<a href="media/appendxa/states/state02.pqs" title="State file (PQS)">State #2</a>
<a href="media/appendxa/states/state02.pqs.txt" title="Same state file with TXT extension" class="state-txt">.TXT</a>
(58 squares, 2 suns, 2 stars):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/state02.png">
<img class="framed" src="media/appendxa/state02.png" alt="State #2">
</a>
</div>
<p id="transf02"><a class="anchor" href="#transf02"></a>
<a href="step05.html" title="Step 5: The Three Rotations">Transformation #2</a> (duplicate layer #2 and rotate it 90° clockwise):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/transf02.gif">
<img class="framed anim" src="media/appendxa/transf02.gif" alt="Transformation #2">
</a>
</div>
<p id="state03"><a class="anchor" href="#state03"></a>
<a href="media/appendxa/states/state03.pqs" title="State file (PQS)">State #3</a>
<a href="media/appendxa/states/state03.pqs.txt" title="Same state file with TXT extension" class="state-txt">.TXT</a>
(86 squares, 3 suns, 3 stars):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/state03.png">
<img class="framed" src="media/appendxa/state03.png" alt="State #3">
</a>
</div>
<p id="transf03"><a class="anchor" href="#transf03"></a>
<a href="step05.html" title="Step 5: The Three Rotations">Transformation #3</a> (duplicate layer #3 and rotate it 90° clockwise):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/transf03.gif">
<img class="framed anim" src="media/appendxa/transf03.gif" alt="Transformation #3">
</a>
</div>
<p id="state04"><a class="anchor" href="#state04"></a>
<a href="media/appendxa/states/state04.pqs" title="State file (PQS)">State #4</a>
<a href="media/appendxa/states/state04.pqs.txt" title="Same state file with TXT extension" class="state-txt">.TXT</a>
(112 squares, 4 suns, 4 stars):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/state04.png">
<img class="framed" src="media/appendxa/state04.png" alt="State #4">
</a>
</div>
<p id="transf04"><a class="anchor" href="#transf04"></a>
<a href="step06.html" title="Step 6: The Reflection">Transformation #4</a> (duplicate whole pattern and reflect it to the Y axis):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/transf04.gif">
<img class="framed anim" src="media/appendxa/transf04.gif" alt="Transformation #4">
</a>
</div>
<p id="state05"><a class="anchor" href="#state05"></a>
<a href="media/appendxa/states/state05.pqs" title="State file (PQS)">State #5</a>
<a href="media/appendxa/states/state05.pqs.txt" title="Same state file with TXT extension" class="state-txt">.TXT</a>
(<a href="step07.html" title="Step 7: The Control Phase">control phase</a>: 192 squares, 8 suns, 8 stars):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/state05.png">
<img class="framed" src="media/appendxa/state05.png" alt="State #5">
</a>
</div>
<p id="transf05"><a class="anchor" href="#transf05"></a>
<a href="step08.html" title="Step 8: Moving the Items">Transformation #5</a> (move corner items toward
center by √8 units (2 in both directions)):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/transf05.gif">
<img class="framed anim" src="media/appendxa/transf05.gif" alt="Transformation #5">
</a>
</div>
<p id="state06"><a class="anchor" href="#state06"></a>
<a href="media/appendxa/states/state06.pqs" title="State file (PQS)">State #6</a>
<a href="media/appendxa/states/state06.pqs.txt" title="Same state file with TXT extension" class="state-txt">.TXT</a>
(192 squares, 8 suns, 8 stars):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/state06.png">
<img class="framed" src="media/appendxa/state06.png" alt="State #6">
</a>
</div>
<p id="transf06"><a class="anchor" href="#transf06"></a>
<a href="step08.html" title="Step 8: Moving the Items">Transformation #6</a> (move middle items toward
center by 5 units):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/transf06.gif">
<img class="framed anim" src="media/appendxa/transf06.gif" alt="Transformation #6">
</a>
</div>
<p id="state07"><a class="anchor" href="#state07"></a>
<a href="media/appendxa/states/state07.pqs" title="State file (PQS)">State #7</a>
<a href="media/appendxa/states/state07.pqs.txt" title="Same state file with TXT extension" class="state-txt">.TXT</a>
(192 squares, 8 suns, 8 stars):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/state07.png">
<img class="framed" src="media/appendxa/state07.png" alt="State #7">
</a>
</div>
<p id="transf07"><a class="anchor" href="#transf07"></a>
<a href="step09.html" title="Step 9: The First Fold">Transformation #7</a> (remove corner items):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/transf07.gif">
<img class="framed anim" src="media/appendxa/transf07.gif" alt="Transformation #7">
</a>
</div>
<p id="state08"><a class="anchor" href="#state08"></a>
<a href="media/appendxa/states/state08.pqs" title="State file (PQS)">State #8</a>
<a href="media/appendxa/states/state08.pqs.txt" title="Same state file with TXT extension" class="state-txt">.TXT</a>
(128 squares, 8 suns, 8 stars):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/state08.png">
<img class="framed" src="media/appendxa/state08.png" alt="State #8">
</a>
</div>
<p id="transf08"><a class="anchor" href="#transf08"></a>
<a href="step09.html" title="Step 9: The First Fold">Transformation #8</a> (fold items and "fringes" to their inner edges):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/transf08.gif">
<img class="framed anim" src="media/appendxa/transf08.gif" alt="Transformation #8">
</a>
</div>
<p id="state09"><a class="anchor" href="#state09"></a>
<a href="media/appendxa/states/state09.pqs" title="State file (PQS)">State #9</a>
<a href="media/appendxa/states/state09.pqs.txt" title="Same state file with TXT extension" class="state-txt">.TXT</a>
(80 squares, 4 suns, 8 stars):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/state09.png">
<img class="framed" src="media/appendxa/state09.png" alt="State #9">
</a>
</div>
<p id="transf09"><a class="anchor" href="#transf09"></a>
<a href="step10.html" title="Step 10: The Second Fold">Transformation #9</a> (fold top items):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/transf09.gif">
<img class="framed anim" src="media/appendxa/transf09.gif" alt="Transformation #9">
</a>
</div>
<p id="state10"><a class="anchor" href="#state10"></a>
<a href="media/appendxa/states/state10.pqs" title="State file (PQS)">State #10</a>
<a href="media/appendxa/states/state10.pqs.txt" title="Same state file with TXT extension" class="state-txt">.TXT</a>
(72 squares, 4 suns, 8 stars):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/state10.png">
<img class="framed" src="media/appendxa/state10.png" alt="State #10">
</a>
</div>
<p id="transf10"><a class="anchor" href="#transf10"></a>
<a href="step10.html" title="Step 10: The Second Fold">Transformation #10</a> (fold right items):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/transf10.gif">
<img class="framed anim" src="media/appendxa/transf10.gif" alt="Transformation #10">
</a>
</div>
<p id="state11"><a class="anchor" href="#state11"></a>
<a href="media/appendxa/states/state11.pqs" title="State file (PQS)">State #11</a>
<a href="media/appendxa/states/state11.pqs.txt" title="Same state file with TXT extension" class="state-txt">.TXT</a>
(61 squares, 4 suns, 8 stars):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/state11.png">
<img class="framed" src="media/appendxa/state11.png" alt="State #11">
</a>
</div>
<p id="transf11"><a class="anchor" href="#transf11"></a>
<a href="step10.html" title="Step 10: The Second Fold">Transformation #11</a> (fold bottom items):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/transf11.gif">
<img class="framed anim" src="media/appendxa/transf11.gif" alt="Transformation #11">
</a>
</div>
<p id="state12"><a class="anchor" href="#state12"></a>
<a href="media/appendxa/states/state12.pqs" title="State file (PQS)">State #12</a>
<a href="media/appendxa/states/state12.pqs.txt" title="Same state file with TXT extension" class="state-txt">.TXT</a>
(49 squares, 4 suns, 8 stars):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/state12.png">
<img class="framed" src="media/appendxa/state12.png" alt="State #12">
</a>
</div>
<p id="transf12"><a class="anchor" href="#transf12"></a>
<a href="step10.html" title="Step 10: The Second Fold">Transformation #12</a> (fold left items):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/transf12.gif">
<img class="framed anim" src="media/appendxa/transf12.gif" alt="Transformation #12">
</a>
</div>
<p id="state13"><a class="anchor" href="#state13"></a>
<a href="media/appendxa/states/state13.pqs" title="State file (PQS)">State #13</a>
<a href="media/appendxa/states/state13.pqs.txt" title="Same state file with TXT extension" class="state-txt">.TXT</a>
(37 squares, 4 suns, 8 stars):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/state13.png">
<img class="framed" src="media/appendxa/state13.png" alt="State #13">
</a>
</div>
<p id="transf13"><a class="anchor" href="#transf13"></a>
<a href="step11.html" title="Step 11: The Final Figure">Transformation #13</a> (remove the inner and the redundant elements):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/transf13.gif">
<img class="framed anim" src="media/appendxa/transf13.gif" alt="Transformation #13">
</a>
</div>
<p id="state14"><a class="anchor" href="#state14"></a>
<a href="media/appendxa/states/state14.pqs" title="State file (PQS)">State #14</a>
<a href="media/appendxa/states/state14.pqs.txt" title="Same state file with TXT extension" class="state-txt">.TXT</a>
(<a href="step11.html#a564" title="Step 11: The Final Figure">final figure</a>: 7 squares, 1 sun, 2 stars):
</p>
<div class="img-wrapper">
<a class="img" href="media/appendxa/state14.png">
<img class="framed" src="media/appendxa/state14.png" alt="State #14">
</a>
</div>
<h3 id="pqs-format"><a class="anchor" href="#pqs-format"></a>State file format</h3>
<p id="a84b"><a class="anchor" href="#a84b"></a>
The Palenque state file (PQS) describes a state in the transformational process.
It is a 7-bit ASCII text (no special characters are used),
where the newline is always represented exclusively by the line feed (<code>0x0A</code>) character (Unix mode).
</p>
<p id="a4a0"><a class="anchor" href="#a4a0"></a>
The first line of the file contains the "<code>PQS</code>" string, a space (<code>0x20</code>) separator,
and the zero padded, two characters long state number (e.g. <code>PQS 03</code>).
</p>
<p id="a61c"><a class="anchor" href="#a61c"></a>
After an empty line, the coordinate system and its content is described
in 51 rows and 51 columns, where each cell is represented by one of the following characters:
</p>
<table>
<tbody>
<tr>
<th>Character</th>
<th>ASCII code</th>
<th>Meaning</th>
</tr>
<tr>
<td>.</td>
<td>0x2E</td>
<td>Empty cell</td>
</tr>
<tr>
<td>x</td>
<td>0x78</td>
<td>Origin (only if empty)</td>
</tr>
<tr>
<td>Q</td>
<td>0x51</td>
<td>A square cell</td>
</tr>
<tr>
<td>S</td>
<td>0x53</td>
<td>Center cell of a sun symbol</td>
</tr>
<tr>
<td>s</td>
<td>0x73</td>
<td>Non-center cell of a sun symbol</td>
</tr>
<tr>
<td>R</td>
<td>0x52</td>
<td>Center cell of a star symbol</td>
</tr>
<tr>
<td>r</td>
<td>0x72</td>
<td>Non-center cell of a star symbol</td>
</tr>
</tbody>
</table>
<p id="ad8e"><a class="anchor" href="#ad8e"></a>
After an empty line, the item statistics follow
in 3 lines for the Q, S and R items consecutively,
for each line with the format:
</p>
<ol>
<li>one character item type identifier (Q, S or R);</li>
<li>space separator;</li>
<li>the number of the items of this type in three characters, with zero padding (e.g. 032);</li>
<li>for each item (from top to down and from left to right) its coordinates in 8 characters, with the following format:
<ol>
<li>space separator;</li>
<li>X coordinate in 3 characters: sign (+/-) and zero padded value in two characters (0 is represented as +00);</li>
<li>comma separator;</li>
<li>Y coordinate in the same format as X.</li>
</ol>
</li>
</ol>
<p class="note" id="ac8b"><a class="anchor" href="#ac8b"></a>
Note: The state files were generated with the help of the
<a class="external" href="https://github.com/akusius/palenque-animation/blob/master/src/hu/akusius/palenque/animation/rendering/StateAnalyzer.java"><code>StateAnalyzer</code></a> class
of the <a href="appanim.html" title="PalenqueAnimation (Java Application)">PalenqueAnimation</a> application.
In order to create the files, at first the <code>ENABLED</code> field of the class
must be set to <code>true</code>, and then each frame (or at least one per state) must be rendered by the
<a class="external" href="https://github.com/akusius/palenque-animation/blob/master/src/hu/akusius/palenque/animation/rendering/FrameRenderer.java"><code>FrameRenderer</code></a> class.
(For this purpose, running once the <code>test1()</code> method in the
<a class="external" href="https://github.com/akusius/palenque-animation/blob/master/test/hu/akusius/palenque/animation/rendering/FrameRendererTest.java"><code>FrameRendererTest</code></a> class
could be the easiest way.)
</p>
</div>
<div id="repo-link">
<a class="external" href="https://github.com/akusius/palenque/blob/master/public_html/appendxa.html" title="The 'appendxa.html' file in the source repository (access key: S)" accesskey="s" target="_blank">
<span></span>
</a>
</div>
<div id="share">
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fakusius.github.io%2Fpalenque%2Fappendxa.html" title="Share on Facebook" target="_blank"><span class="facebook"></span></a>
<a href="https://twitter.com/share?url=http%3A%2F%2Fakusius.github.io%2Fpalenque%2Fappendxa.html&hashtags=PalenqueCode&via=Akusius" title="Share on Twitter" target="_blank"><span class="twitter"></span></a>
<a href="https://plus.google.com/share?url=http%3A%2F%2Fakusius.github.io%2Fpalenque%2Fappendxa.html" title="Share on Google+" target="_blank"><span class="gplus"></span></a>
<a href="https://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fakusius.github.io%2Fpalenque%2Fappendxa.html&title=Appendix%3A%20State%20and%20Transformation%20Reference%20%7C%20The%20Palenque%20Code" title="Share on LinkedIn" target="_blank"><span class="linkedin"></span></a>
<a href="https://tumblr.com/widgets/share/tool?canonicalUrl=http%3A%2F%2Fakusius.github.io%2Fpalenque%2Fappendxa.html&title=Appendix%3A%20State%20and%20Transformation%20Reference%20%7C%20The%20Palenque%20Code" title="Share on Tumblr" target="_blank"><span class="tumblr"></span></a>
<a href="https://www.reddit.com/submit/?url=http%3A%2F%2Fakusius.github.io%2Fpalenque%2Fappendxa.html&title=Appendix%3A%20State%20and%20Transformation%20Reference%20%7C%20The%20Palenque%20Code" title="Share on Reddit" target="_blank"><span class="reddit"></span></a>
<a href="mailto:?subject=Appendix%3A%20State%20and%20Transformation%20Reference%20%7C%20The%20Palenque%20Code&body=http%3A%2F%2Fakusius.github.io%2Fpalenque%2Fappendxa.html" title="Share by email"><span class="email"></span></a>
</div>
<div id="comments">
<div id="disqus_thread"></div>
<script type="text/javascript" src="js/disqus.js"></script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
</div>
</body>
</html>