Sun Mon Tue Wed Thu Fri Sat
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
|
UTF-8
On March 14, I presented a pretty looking function
for checking whether a string is encoded with UTF-8. Yesterday, I realized that
there is an error in the algorithm when a UTF-8 sequences consisting of
multiple bytes is terminated prematurely. This morning, I wrote a program to check an improved version of the function. This looks less
beautiful, but that is partly also because of improved checking. This function
only checks UTF-8 characters up to four bytes (as is defined by the current
standard). The added check (marked with slightly text colour) is that
characters represented by multiple bytes actually fall in the range for which
that number of bytes is intended. Theoretical it is possible to represesnt
every possible value with in the range of valid Unicde code points with a
sequence of four bytes.
bool valid_UTF8(const unsigned char *s)
{
while (*s != 0)
if ( *s < 0x80
|| ((*s & 0xe0) == 0xc0
&& (*s & 0x1e) != 0
|| ((*s & 0xf0) == 0xe0
&& ((*s & 0x0f) != 0 || (s[1] & 0x20) != 0)
|| (*s & 0xf8) == 0xf0
&& ((*s & 0x07) != 0 || (s[1] & 0x30) != 0)
&& (*(++s) & 0xc0) == 0x80)
&& (*(++s) & 0xc0) == 0x80)
&& (*(++s) & 0xc0) == 0x80)
s++;
else
return false;
return true;
}
Today, Andy and I joined the yearly Truck Run
organized by De
Tukker Truckers, just like we did two years
ago. The GPS-track of how we drove in KML file
for Google Earth or in
Google Maps.
Street Tiling: correction
When calculating the number of tilings within rectangles of various sizes, I
discovered some serious omissions in the set of initial tiles, invalidating all
previous results, like those presented on May 20.
The set of possible tiles is extended to:
AA AA AA AA AB AB AB AB AB AB AD AD AD AD AD AD AG AG AG BA BA BA
BD CD DA DD AA AB BA BC CA DE AB BC BG CG DA DG AB BC DA AD CD EA
BA BC BD BD BD BD BD BD BG BG BG CA CA CD CD CG DA DA DA DA DD DD
ED EF AB AG BC CG EA EG AB BC EA FA FD FA FG FA AB BC BD CD BG CG
DE DE DE DE DE DE DG DG EA EA EA EA EA EA ED ED ED EF EF EF EF EF
AA AB BA BC CA GH AB BC AB AD BC CD HA HD AG CG HA AA AB BA CA HI
EG EG EG FA FA FA FA FA FA FD FD FD FG FG FG GH GH GH GH GH HA HA
AB BC HA AB AD BC BD IA ID AG BG IA AB BC IA AA AB BA BC CA AB AD
HA HA HD HD HD HD HI HI HI HI IA IA IA IA ID ID ID ID
BC CD AB AG BC CG AA AB BA CA AB AD BC BD AB AG BC BG
The impossible (partial) diagonal sequences are:
AABAG AABBD AABBG AABDG AABEA AABEG AABFG AABHA AABHD BABAG BABBD
BABBG BABDG BABEA BABEG BABFG BABHA BABHD CABAG CABBD CABBG CABDG
CABEA CABEG CABFG CABHA CABHD CADAA CADAD CADAG CBDAA CBDAD CBDAG
BDDAA BDDAD BDDAG CDDAA CDDAD CDDAG AEDAA AEDAD AEDAG CEDAA CEDAD
CEDAG AFDAA AFDAD AFDAG BFDAA BFDAD BFDAG CHDAA CHDAD CHDAG
AABIDAA AABIDAD AABIDAG BABIDAA BABIDAD BABIDAG CABIDAA CABIDAD
CABIDAG
However, when calculating the number of (complete) diagonal sequences, it shows
that some diagonal sequences have no continuation, in the sense that there is
no two longer sequence that is based on it. The smallest such example is the
sequence "DAAHIFAAB". Note that this sequence is one of the impossible
(partial) diagonal sequences mentioned May 20.
There is only one way the top left part can be filled, namely with a three by
three in the top corner and two one by two tiles with the longest side touching
the left and top sides. When placed in a rectangle, this sequences has 62
different solutions in the right bottom part. However for the next (partial)
diagonal sequence there are only eight different ways it is filled for these
62 solutions. When these sequences are extended with an 'A' on both sides,
always the first three and/or the last three have no tile available, thus
making them impossible for a (complete) diagonal sequence. Longer sequences
that start or end with the "DAAHIFAAB" if (and maybe: and only if) they are
followed or preceded with the sequence "DEB", which forces an 'A' for the next
diagonal.
Below the updated table for the number of sequences per diagonal length.
l #dia #pat 1 2 3 4 5 6 7 8
-------------------------------------------------------------
3 3 3 3
5 6 6 6
7 14 14 14
9 47 47 47
11 140 141 139 1
13 544 658 442 90 12
15 2616 3708 1868 446 260 42
17 15111 25750 8838 3392 1930 539 306 94 8 4
The latest version of the program also
calculates the number of unique (with respect to rotations and mirroring)
tilings inside rectangles of various sizes. The algorithm first calculates
possible combinations of two rows for a given width, and next uses a recursive
algorithm to find the number of patterns for a given height. This could be
improved with a matrix transfer method and it is also possible to derive
recurrence equations for each row (and column) for this table. Although the
table is symmetric along the main diagonal, the numbers above and under the
diagonal have been calculated independently to verify the correctness of the
algorithm. (The output of the program also contains a table with all tilings.)
| 1 2 3 4 5 6 7 8 9 10
----+------------------------------------------------------------
1 | 1 1 0 0 0 0 0 0 0 0
2 | 1 1 1 0 0 0 0 0 0 0
3 | 0 1 2 0 1 2 1 4 5 3
4 | 0 0 0 0 1 1 1 0 2 3
5 | 0 0 1 1 2 4 6 12 28 57
6 | 0 0 2 1 4 0 18 33 49 105
7 | 0 0 1 1 6 18 8 77 195 687
8 | 0 0 4 0 12 33 77 166 1204 5135
9 | 0 0 5 2 28 49 195 1204 3217 29733
10 | 0 0 3 3 57 105 687 5135 29733 83306
Below the 166 unique street tiling patterns that fit in an eight
by eight square.
7000 Eichen Map
At 9:25, I bought the map 7000 Eichen -
Standorte: Ausschnitt der Karte der Stadt Kassel (estimated scale 1:20,000)
at chariry shop Het Goed for € 0.50.
I found this map without price between the art books and someone working at the
shop, suggested that it might have fallen out of some book. I made some remark
about how a map about oak trees in a city could be related to art. He than gave
it a price. But at home, I discovered that the map was about an art project
called 7000 Eichen –
Stadtverwaldung statt Stadtverwaltung by the artis
Joseph Beuys which
he made around 1982 as part of Documenta 7 in Kasselt. I will see if check if
I can find a book about this at the shop and buy it as well.
Book
I recieved the book AKI 1999 EINDEXAMENS edited by Maarten Binnenhuis,
Sipke Huisman, and Regina Kroeders written in Dutch and English published by
AKI academie voor beeldende kunst en vormgeving in 1999, for which I paid
€ 8.90.
Kunst in het Volkspark
In the afternoon, I went to het Volkspark (literally, the people's park)
in Enschede to attend an open art exhibition. I
came along the tent of the art gallery Beeld en Aambeeld and found that they had some works by Billy Foley on display. At half past two, I listened to a one hour
performance of Netherlands Symphony Orchestra. I met with several new and (very) old
acquaintances. I also listened to Twents Jeugd Symfonie Orkest when they
started playing "Millenium" by Richard Meyer, which to me has some similarities
with music from Star Wars and The Lord of the Rings. Could have been written
for a movie. (See for example a performance by SC All-State Junior Orchestra 2011.) The GPS-track of how
I walked in KML file for Google Earth or in Google Maps
More Versaille like patterns
In the past weeks the Street Tiling Patterns
program crunched on to find more and more solutions. For size 36 it found a
total of 1735 unique patterns. Below, I have given the 74 patterns of size 36
that use the same ratio of kinds of tiles as found in the Versaille pattern,
many of which are not laid out in a six by six square pattern as the Versaille
pattern.
Amsterdam
Around 11, I arrived in Amsterdam and went to bookshop Scheltema. I bought the audiobook (consisting of 10 audio CD's
Extremely Loud & Incredibly Close,
ISBN:9781464009136, for € 8.90 and the catalog of exihibtion
Invisible Poem, ART LABOR Gallery, Shanghai, China with works by
Lu Xinjian for
€ 8.00.
Around 1 in the afternoon, I arrived at the Rijksmuseum where I met with Meindert.
I first wanted to go to Room 3.4. Before getting there we saw three paintings
by Karel Appel and
a video of Imponderabilia by Marina Abramović and Ulay. In Room 3.4, I first went to look at the works:
Before I went over to:
I took a picture of it, which I added to the website about the work called PLONS in Dutch. Next also had a look at:
Next Meindert took me on a tour through the museum. We saw, among may others,
the following works:
- The Crucifixion by Jacob Cornelisz van Oostsanen,
about 1507-1510. (In Room 0.1)
- Memorial Tablet for the Lords of Montfoort, about 1400. (In Room 0.4)
- Landscape with an Episode from the Conquest of America by
Jan Jansz Mostaert, about 1535. (In Room 0.4)
- The calling of St John during the marriage at Cana by Jan
Cornelisz Vermeyen, about 1530 - 1532. (In Room 0.6)
- The Deposition and the Entombment by 1290. Note 'carpenter'
removing a nail from the feet of Christ. (In Room 0.2)
- Portrait of a Girl Dressed in Blue by Johannes Cornelisz.
Verspronck, 1641. (In Eregalerij)
- Gallant Conversation, Known as ‘The Paternal Admonition'
by Gerard ter Borch (II), about 1654. (In Room 2.25)
- Still Life with Asparagus by Adriaen Coorte, 1697.
(In Room 2.24)
- Jeremiah Lamenting the Destruction of Jerusalem by
Rembrandt Harmensz. van Rijn, 1630. (In Room 2.8)
- Self-portrait by Vincent van Gogh, 1887. (In Room 1.18)
- La Corniche near Monaco by Claude Monet, 1884. (In Room 1.18)
- Portrait of Albert Verwey by Jan Veth, 1885. (In Room 1.18)
- The Singel Bridge at the Paleisstraat in Amsterdam by
George Hendrik Breitner, 1896. (In Room 1.18)
- The Voorstraat Harbour in Dordrecht by Willem Witsen, 1898.
(In Room 1.18)
- View of the Oosterpark, Amsterdam, in the Snow by
George Hendrik Breitner, 1892. (In Room 1.18)
- Wooded View near Barbizon by Johan Hendrik Weissenbruch, 1900.
(In Room 1.18)
The route we took throught the museum was: Voorhal, Room 3.3, Room 3.4,
Room 0.1, Room 0.3, Room 0.4, Room 0.5, Room 0.6, (back to) Room 0.2, the
library (quite impressive, full of people studying), Nachtwachtzaal,
Eregalerij, Room 2.28 to Room 2.24, Voorhal, Rooms 2.14 to 2.1, Room 1.18
(my favourite), and Room 1.17. Then we had some coffee/tea with a brownie.
Small magnolia tree
our small magnolia tree has survived the frost
period from early May. It is now about 25 cm tall.
It seems that the budds at the top have died, preventing the tree to grow
higher. But I notived something near one of the leaves that could grow into a
new branch.
I just searched for the track about the digits pages in Extremely Loud & Incredibly Close on the audio book, I bought last Wednesday. It starts on track 14 of disk 8. I was a little
disappointed to discover that they skipped the whole pages of digits after the
first 8 on the first full line of digits on page 269. It thought that
unabridged meant: "Containing the original content; not condensed". Leaving
out almost two and half pages of text (arguably very boring text, that no one
would have actually read) does not feel like: original content. Also the
condensed text starting from "I've seen him" on page 281, which is still
readable for the first lines, has been left out at the end of track 6 of
disk 9.
AKI finals 2016
In the afternoon, I went to the AKI finals 2016 exhibition. I first visited Dynamo
Expo. Next, I went to TETEM art space.
Finally, I visited the main AKI ArtEZ building.
At 18:01, I bought the book analoog | analogue | analog edited by Johan
Visser written in Dutch, English, and German published by AKI ArtEZ on Friday,
June 24, 2016, ISBN:9789075522372, from AKI ArtEZ for € 15.00. I found the
following artist interesting:
- Bo Lamers. A large self-portret is
reproduced on the outside of the building. She also had a collage of
painting and drawing, which I found less interesting.
- Annejet Riedijk. She had two videos and
five paintings on display. I find her painting style very interesting. In a
sense it is very vague and with odd colours, but yet it looks very
realistic, almost like you watching reality through a kind of filter.
- Marcel Berwanger. He had a
sketch book with experimental calligraphy that looked very interesting.
- Ilse Löbker. I found her
Vertaalconcept (Translation concept) rather interesting.
- Joyce Rothman. Her combination of
linocuts and poems under the title Vluchten (fleeing) was
interesting.
- Rahel Kausemann. I liked her
design of her master thesis.
- Dieuwke Eggink. I especially
found his three paintings of the same scene with different colours
interesting.
- Huub van Stijn with his
Atlas of Desolation consisting of large sized book, a small
booklet and a wall painting.
Novel
At 17:39:14, I bought the novel De ontsnapping written by
Heleen van Royen
written in Dutch published by Heleen van Royen in 2009,
ISBN:9789049951313, from bookshop Broekhuis
for € 6.00.
Jellyfish
The tweet Will
each jellyfish in this GIF eventually end up where it started? with
a GIF by Frédéric Vayssouze-Faure encouraged me to write
a program to analyse this GIF. Of course,
as there are only a finite number of states, at some point all jellyfish will
be at their starting location. But how many swim movements will it take. I used
GIF maker to retrieve the movements. I
already had noticed that there were three types of swim movements that were
repeated over and over again. I encoded these in the program with the
characters '>', '<', '^', 'v', and '|'. The latter I used to replace
'^' and 'v' when I realized that it is always possible to derive which one
should be used. The program quickly found that after 6192 swim movements all
jellyfish have returned at their original location. Vayssouze-Faure placed
the remark: "If I had the time I would check if one of them can reach the
bottom from the top…"
After 23 swim movements the first jellyfish from the fifth column arrives at
the top left corner. After 197 swim movements there are six jellyfish from the
bottom at the top row. This is the configuration using hexadecimal digits from
the row and the column:
F6 F5 5A F3 F2 39 F0 E4 10 F1 05 1D 1C 08 1E 0A
B7 A7 9B 18 8A 16 40 D0 A0 B4 1F 4B 3F 0D 0C 29
E3 06 9C 6E 7C 24 25 B1 70 02 2D D3 1A A4 0F 1B
F9 A9 5D 09 26 C3 11 C1 3D 5C 91 5E 48 14 28 74
0B AA 6B D1 32 57 30 4A 65 00 38 2C D4 04 01 3B
C2 81 2A 3E 6C 49 31 54 68 52 4C 07 33 2B 44 3A
FC 0E 8F 62 56 64 61 75 B0 46 83 80 45 20 98 35
5F 76 73 D2 79 03 E0 67 13 21 55 4D 22 50 59 3C
A1 A2 2F 9D 69 D7 F4 15 E1 5B 12 19 4F 97 89 77
FF 92 C0 90 F7 E7 71 E5 42 27 53 43 4E BC 2E 47
A3 82 C7 C4 8D D9 36 E2 23 37 58 DF 34 BF ED AE
C8 E9 CA D6 66 72 D5 41 17 A5 51 AF BD AD FB 85
CF A6 B8 A8 87 8C 9A 60 BE 6A EB AC FE DB DE CE
B3 6F B5 94 99 9E EE 6D 7F 63 93 CB DD F8 E6 D8
C5 95 B2 84 78 86 7A 7D CD E8 FA CC C9 EC DC 88
9F B6 8E 96 B9 7E BB AB EA BA 7B DA FD 8B C6 EF
If we look at where the jellyfish each time the three swim movements have been
performed, it turns out that there are eleven different sequences, which when
marked with the letter 'a' to 'k', results in the following table:
a a a a a a a a a a b a c b a c
a a a a a a d a a a c c b c c b
a a a a d d d a c a a e e c a a
a a a a a a a a e a c a a c a c
a a a a a a f a e f e e e a a a
a a a a f a f f a a a a e a c a
a f f a f f a f f a a a a a a a
a a a f a f f a a f a a a a a a
a f g a a a a a a a a a a a a a
g a g a a a a a a a a a a a a a
a a g a a a a a a a a a h i i h
a a a a a a a a a a h h i h h i
a a a a a a h a a h a j h h h a
a a a a a a a a h a k j h j h h
a a a a a a h a k a k j h h h h
a a a a a a a a h a k h a h h a
There are six sequences ('b', 'd', 'g', 'i', 'j', and 'k') with a length of
12 swim movements (where the letter of each sequence appears four times in
the table), a sequence ('e') of length 24, a sequence ('c') of length 36, a
sequence ('f') of length 48, and a sequence ('a') of length 516. The
least common
multiplier of the lengths is 6192. Actually, this is the least common
multiplier of 516, 72, and 48. The real big question is if there exists a
combination of three swimming patterns with an even larger repeat length. It
seems that the jellyfish never make a complete turn from one swimming pattern
to the next. (I have not verified this with the program.) It seems a good
requirement to imposse on combinations of swimming patterns. Of course, one
could also ask this question for smaller sized squares (or rectangles) and
with different number of swimming patterns.
This months interesting links
Home
| May 2016
| July 2016