Hexagons on the Sidewalk (and other related subjects)

This page was contributed to the Hall of Hexagons by R. F. Housholder,
who writes:

This document relates the story of some experiments that were performed on hexagons. It all started in the city of Puerto de la Cruz on the island of Tenerife in the Canary Islands in December, 2004. My wife and I were exploring the town and came across a green sidewalk that was tiled with hexagonal tiles. Upon closer examination, I saw that the hexagon pattern on each tile was identical and that the overall pattern was made by rotating the tiles and placing them in a repeating sequence so that the pattern continued the entire length of the sidewalk, probably in excess of 100 meters.

Here is a photograph of a section of the sidewalk as it appeared while we were walking along.

After we returned home from our trip, I did some exploring on the internet on the subject of hexagonal patterns and discovered that, among other things, there had been a game created some 40 years ago called Psyche-Paths which used not only hexagonal tiles, but colored paths through each one. There is a site called www.gamepuzzles.com, a company called Kadon, and a game called Kaliko where more information regarding the game can be found.

I would like to emphasize that the information subsequently presented is probably by no means unique. Given a geometric design as basic as a hexagon, I am sure that over the millennia, many more hexagonal-oriented relationships have been discovered and noted than I have time to research and uncover. So, in a spirit of exploration and with apologies to anyone who may feel slighted by the material presented here, I offer the results of my recent effort. Feel free to contact me at ladinenfrank@t.online.de.

Description of Experiments

Being a computer graphics person by profession, it didn't take long for my curiosity to get the best of me and I began doing some experimenting on my own. I successfully analyzed and duplicated the sidewalk pattern first seen in Tenerife and figured out its underlying hexagonal pattern groupings. Then I went on to explore many more aspects of the subject. I have nowhere nearly exhausted all of the possibilities associated therewith, but have uncovered some interesting relationships and results which I herewith relate.

The following diagram shows the pattern I ended up with. I have superimposed a red line that closely approximates the pattern shown in the sidewalk photo. The view has the same orientation as does the photo and the angled-in portion is due to camera perspective.

The design shown is made of one type of hexagon in which three pairs of sides are connected with curved lines: 1 set of adjacent sides by a small circle and two sets of larger curves that span non-adjacent sides. Being hexagons, it is obvious that with this particular design, there are six possible orientations.

I considered an arrangement where different sides were connected by lines or paths and figured that it was the same as having 6 things taken two at a time. If we number the sides starting with 0 at the top and progress counterclockwise through 5, the following table illustrates the number of different permutations.

 0 1                        
 0 2   1 2                  
 0 3   1 3   2 3            
 0 4   1 4   2 4   3 4      
 0 5   1 5   2 5   3 5   4 5

Each hexagon must have each of the sides connected, but no side may be used more than once in any configuration. This results in five separate, unique path groupings that can connect the sides of a hexagon: (They are labelled from 0 to 4 to correspond with the patterns of the next diagram. Also, since I'm a C programmer, I tend to number things by their indices which usually begin with zero.)

0: 0 1   2 4   3 5
1: 0 1   2 3   4 5
2: 0 3   1 5   2 4
3: 0 3   1 2   4 5
4: 0 3   1 4   2 5

These numerical patterns are a little easier to visualize if we show them as actual hexagons. The next view does this:

Here, the far left column corresponds to the five previous patterns using the above numbering convention and the bottom face being zero and proceeding clockwise around the hexagon. As an example, consider the top row of the numerical list above and the top-left hexagon. One can easily see that sides 0 (bottom) and 1 (the next side clockwise) are connected. Then the path starting at side 2 skips side 3 and goes to 4. Likewise, the path beginning with side 3 skips side 4 and goes to side 5. All of this is also expressed in the top row of the table above the diagram.

If the top left hexagon is rotated (clockwise in this example), there are six unique patterns that result. Due to symmetry, the rest of the patterns in the rows above the bottom one have from 1 to three variations. This gives a total of 15 different patterns for the connections of the sides.

Our Tenerife sidewalk pattern used only hexagons from the top row of the above diagram and, in fact, used them in a simple, 4 x 4, repeating grouping. If we label the top row's rotational variants starting from the left with 0 through 5, the Tenerife pattern is formed by:

 1 0 4 0
 3 5 2 2
 4 0 1 0
 2 2 3 5

As expressed in hexagons, it looks like this:

Due to the fact that the hexagons have to align on six sides, the 4 by 4 pattern above is translated into straight vertical columns that are offset every other one so that the hexagon faces touch each other where required. Note that the 4 by 4 numeric pattern is made up of two, separate 2 by 2 patterns in a checkerboard arrangement. Upon close examination, the graphical, hexagon rendition shows this same pattern. Pretty amazing when you consider that this design is made from only one hexagonal tile that is simply rotated to place its various paths into different relationships.

So far, we have made a pattern using only one type of hexagonal pattern and have been doing so using a fixed, repeating set of orientations. What would happen if we chose random rotations for this same hexagon?

The following picture shows our same hexagon, but at random orientations in a larger matrix.

Here, the same hexagon has been placed in random orientations. Then, every connected path that goes to an outside edge was traced in black after which, any remaining internal loops were traced using random colors.

The following four views are made the same way, but use the other types of hexagons. (Refer to the diagram, above, that shows the types.) The above pattern was made using the patterns on row 0. Using patterns from row 1 produces this:

Row 2 makes this:

Row 3 this:

And finally, the bottom row, 4, makes this pattern:

Note that it can never have any isolated loops. Also note that, even though this pattern connects the same sides at each rotation, the arrangement of the paths stacking (from top to bottom) changes with the random orientations.

So, what would happen if we allowed the patterns as well as the orientations to be randomly chosen? The following diagram shows an example of this:

Variations are endless. For example, if we simply let the pattern vary as the y axis modulo 5 (the total number of patterns) and the rotation vary as the x axis modulo 6 (the total number of rotations), we obtain this repeating pattern.

Making the y and x vary by 4 and 4 produces this:

Remember that odd columns are offset differently from even ones. This modifies the pattern a bit. Another variation is made by adding 1 to each value above and this produces:

Using a 3 x 3 pattern makes the following pattern. Again, due to the offsetting of the y spacing to accommodate the hexagon pattern, it looks as if the pattern might be repeating in 6 in x.

Limiting the pattern to a constant and having the rotation vary by a regular cycle of, say, 3 produces this:

And swapping axes makes:

It is hard to believe that all of these patterns are made using hexagons with the various sides connected and at various rotations.

What happens when this technique is performed on a much larger number of hexagonal elements? In order to find out, the program was run with an array of 250 by 125 hexagons, this totals to 31,250. The parameters were set so that those paths that intersected an edge were not shown and only those paths that looped back on themselves were colored and plotted. Of course, with such a small plot area, the overall characteristics are all that can be seen. However, this afforded some interesting things to ponder.

Recall that pattern 4 does not form any loops; all of its paths, by definition, intersect the edges. Therefore, only patterns 0 through 3 were used for this exercise. In showing these patterns, an overall view of the 250 x 125 area is first shown followed by a randomly chosen, zoomed-in sample region to give a little more of an idea of why the patterns are formed in their respective ways. The results: Pattern 0:

Pattern 0 zoomed:

Pattern 1:

Pattern 1 zoomed:

Pattern 2:

Pattern 2 zoomed:

Pattern 3:

Pattern 3 zoomed:

This next macro-view was made by randomly selecting the hexagon (including the pattern from the top row of the key) and the rotation. No zoomed in area was plotted.

And finally, this zoomed in area shows the results of fixing the rotation at 0 and randomly choosing the first 4 patterns:

Using Hexagon Patterns to Encode Secret Messages

All of this pattern generation using random techniques is, in itself, interesting. Yet, if one were to use the simple hexagon and rotation techniques to intentionally encode information, one could have a very effective, and at the same time, fun scheme for generating secret messages. For example, the phrase:

Now is the time for all good people to come to the aid of their party.

Could be encoded to appear as this:

In order to perform such an encoding, it is necessary to convert from one kind of representation to another. In this case, we're converting from what is called "plaintext" to hexagons and their rotations. So, the first thing we have to do is to define some kind of relationship between each character in our message and the hexagon and rotation that represents it.

Go back and review the hexagon and rotation patterns as they were defined earlier in the document. If we examine the patterns on rows 0 through 3, we see that after a certain number of rotations, the patterns repeat. Only row 0 contains patterns that are unique for the six possible rotations. The following table lists the unique x and y (column and row) coordinates of the 15 unique patterns:

 0 0   0 1   0 2   0 3   0 4   0 5
 1 0   1 1
 2 0   2 2   2 3            
 3 0   3 2   3 3            
 4 0

The pattern, 4 0, really has no rotational variation and is also very easy to spot when used in a plot of hexagon patterns and so it was removed from the "collection" of valid hexagon-rotation combinations, leaving a total of 14 unique patterns as shown next:

Obviously, only 14 patterns can't begin to be enough to encode all the letters of the alphabet, the numerals, and certain special characters. However, by using two of the above patterns with which to perform our encoding, we would have 14 x 14 or 196 possibilities. This is still not enough to code all of the 8-bit ASCII character set, which consists of 256 entries, but it is enough for us to encode everything we need... Twice.

There are almost an infinite variety of ways to encode the letters, numbers, and special characters, but, for simplicity, the following matrix was used:

-- 0 1 2 3 4 5 6 7 8 9 a b c d - - - - - - - - - - - - - - 0: A O c q 4 % = { = ! 0 q Y O 1: B P d r 5 & > | > " 1 r Z P 2: C Q e s 6 ' ? } - # 2 k a I 3: D R f t 7 ( @ ~ . $ 3 l b J 4: E S g u 8 ) [ ] / w m U K 5: F T h v 9 * \ ^ : x n V L 6: G U i w + ] _ ) y g W E 7: H V j x , ^ ` * z h X F 8: I W k y - _ ? + 8 s i Q G 9: J X l z . ` @ , 9 t j R H a: K Y m 0 ! / { [ % 4 u c S A b: L Z n 1 " : | \ & 5 v d T B c: M a o 2 # ; } ; ' 6 o e M C d: N b p 3 $ < ~ < ( 7 p f N D

The first "iteration" of the upper and lower case letters, numbers, and special characters were defined in a "more or less" sorted order. The second was defined in random groups. It is important to stress that there is no one, "correct" definition for the character-to-hexagon/rotation assignment. This aspect could, in itself, be the basis for further complicating the encoding and decoding of secret messages if a separate key were specified for each one. Of course, then you have to have some way to generate the key before you can decode the message and that begins to introduce aspects that tend to get away from our main purpose, which is to show how pairs of rotated hexagons can be used to generate secret messages.

Since the above table contains two ways to encode each character (4 ways for the space), the letter 'a' could be encoded as '1c' or 'c2'. These latter, 'partialially-hexadecimal' values, of course, represent the appropriate pairs of hexagon/rotation combinations shown above. (Partially-hexadecimal refers to the fact that the valid symbols go from '0' to 'd' rather than '0' to 'f' as would be the case with true hexadecimal values.) Using the convention where each hexagon/rotational pair is represented by a single character allows us to represent the encoding of a plaintext character using two of the characters from the column and row headings shown in the diagram above.

Now, go back to our example of encoded text above where the phrase: "Now is the time for all good people to come to the aid of their party." was expressed in hexagon/rotation pairs. If we start in the upper left corner and define the pairs as being grouped in and adjacent, lower and right-going direction, we can see that the first pair consists of a 'c' upper-left and a 'd' lower-right. Refer to the key above and assign the 'c' to the column value. Then come down to the 'd' row. At the intersection of the column and row, we find the value 'N', which is the first letter of our "secret" message. Note that, since our key has two locations containing an 'N', we could have just as easily encoded it as '0d'. The program that does the plaintext to hexagon/rotation is set up to randomly assign any particular encoding. So, it is possible that this message could be encoded in an almost infinite number of ways.

Here is the computer-assigned encoding of our secret message:

N cd o ac w 36   97 i b8 s 32   97 t a9 h 25 e 22
  96 t 33 i 26 m b4 e 22   97 f bd o 2c r 31   96
a c2 l b3 l b3   96 g 24 o 2c o ac d bb   97 p 2d
e 22 o ac p ad l 29 e 22   97 t 33 o 2c   96 c 20
o 2c m b4 e 22   96 t 33 o ac   97 t 33 h b7 e 22
  96 a 1c i b8 d bb   97 o ac f bd   96 t a9 h b7
e 22 i b8 r 31   96 p ad a 1c r b1 t a9 y 38 . 83
~ 73
~ 73

Each letter of our plaintext message has been encoded into a hexagon/rotation pair, the value of which is shown adjacent to the letter. These plaintext-hexagon/rotation values are arbitrarily printed 10 column per row and have no relation to where the hexagons appear in our encoded hexagon plot. In fact, our plot has only 8 pairs in each of its 9 rows.

This brings up another problem in that our encoding scheme does not handle carriage returns and line feeds. To partially negate the requirement for this, a special character, the '~' or tilde, was used to denote an end-of-line condition. Also, an end-of-message is denoted by an additional '~'. This also serves to denote the message boundary from the rectangular boundary. Each message has to fit within a rectangular configuration of hexagons and that array must be large enough to accommodate all the message characters while maintaining an aspect ratio so that the proper aspect ratio is maintained between the x and y axes so that the hexagons don't plot "all squished". So what do we do about any extra spaces left over between the end of the message text and the end of the rectangle? They are simply filled with random values and, after the two tildes have been encountered, any further decoding is meaningless.

It turns out that in our example of "Now is the...", the message was exactly 70 characters in length including the ending period. If we add the two ending tildes, we get 72. Counting the hexagons in our secret message reveals that there are 9 rows of 16 hexagons, which is 144 hexagons, but, since it takes two hexagons to encode a character, if we divide 144 by 2, we get exactly 72 and so, in our example, there were no "filler" locations necessary.

By now, the reader must have concluded that the various colored connecting paths shown in the hexagon/rotation encoded "secret message" have absolutely nothing to do with this encoding scheme and serve only to obfuscate things and add to the confusion factor, which, after all is one of the nice things about writing secret messages. An added benefit is that they look nice.

This page was contributed to the Hall of Hexagons by R. F. Housholder,
to whom many thanks for sharing his work.
Frank can be contacted at ladinenfrank@t.online.de


page date: 2Jun06.      I enjoy correspondence stimulated by this site. You can contact me here.