# Is there a code in this painting?

This was posted in a Facebook group yesterday. It’s also made the rounds on Reddit but all of the commentary seems like scattershot speculation so far. From the post:

This is a painting done my grandfather. I acquired it second hand from my mother. He was an electrical engineer for various government agencies between the 40's and the 80's. He painted a bunch of code like paintings in his retirement. This is one of his best works. Nobody has figured it out so I figured I would throw it out to you guys. The painting is 4ft by 3ft. He graduated from MIT in 1938 with a thesis paper on the band pass filter where the width of the band can be adjusted at will. He loved Morse code and I think this is a good lead on what this is.

I’m not convinced there’s really a code here but I’d love to be proved wrong.

• Reminds me of resistor colour codes, but it's 9x8 across (x64 lines down), so maybe binary representation of ASCII (8 words and a check?). In the coloured lines only blacks are whited, so maybe in the "silver" lines only the missing blacks are 1s? – pbhj Jan 16 '20 at 20:50
• The colors are in a fixed pattern that repeats -> Blue, Red, Yellow, Green, Yellow. They're all spaced with white. Not sure it is a resistor. – Adib Jan 16 '20 at 21:55
• That person's grandfather may be the greatest troll ever :) More seriously, to have a better chance of cracking it, if a hidden code exists, it would be helpful to convert it to a text file or similar, for further manipulation and analysing. – Earlien Jan 17 '20 at 0:03
• My eyes hurt from looking at those colors – Prince North Læraðr Jan 17 '20 at 0:32
• Do you think we could quickly convert it to text. Eg here's the first line: github.com/DrXorile/painting-code. (I'd be fine with any other place. If a bunch of people do one line each, it won't be that painful) – Dr Xorile Jan 17 '20 at 1:27

For starters, I've rectified the data in the image by manually adjusting UV coordinates in Blender:

I edited the rectified image in GIMP, first rescaling to 144x64, then adjusting colors until the resulting image data is perfectly clear (one or two errors may have crept in):

Now if you look closely, every second column is just alternating black/white. Since they contain no data, let's delete those columns:

Here's the final image data in copy-pasteable format (1 means white, 0 means not-white, you know which color belongs where):

000000101000000010001000100100010000000001000001001000000010000000010000
000001010010100101000100010010000100101000100100001010001001010000101000
000000101001000100101000010010000010000000000001000100000001000000000010
000100010100100010010100100001001000101001000010100010010000101001000101
000000001000000101000000000000100000001000100000000101000000000000100000
001000100010010100010100001001000101000010010001010010000101000100101000
000000000001000001011000000100100010000000000010000010010000000001000000
010001001001001000100100010010000100010100100001010001001000010100010010
000000000000001000000001000001000100000000000000100000001001000000010000
001010010100010100100010100100001001010001001000010100010010000101000100
000001001010000000010000000010000100100000000000010001000000001000000010
000101001010001000010000000100010010000101001000101000001001010001001010
010000100101001000000000001000001001000000000100001010000000000001000000
010000100100010100001001000100000100010100100001010001001010000010010001
000001000010010000000000000001001000000001000010001000000000001010000000
000100001001000100001001000000010001010000100100010100001001010001001000
001010010010001000000010000100001000000000010001000000010100001000000100
001010100100011001000001000010000001010010001010000100101000100101000010
000000001000010010000000100001001001000000000010000010100000000100000100
000100001001000101000010001000000100010010100000100100010100100001010001
000000000010000000010001000000100010000000001001000000100010000000000100
001000100101010000100101000101001000010100010010100010010000101001000101
000010100010000001000100000010100000000001000100000001010000000001000000
010001010000100101010001001010000101001000101001000010100010010100001001
000010010001000000000100000100000010000000000000100001010000000001000000
000101010010010001000010100100010100010010100001001000101000010010100010
000010000010100000010001000000101000000000001000001001000100000000010000
001001010001010100001001000101000101001000010100010010100001010001001010
000100101000000000100000001000000000000100010010000000000101000000001000
010001010010100001000100101000101010010000101000100101000010010100010010
000000010001000000010010000010000101000000000010001000000100100000000110
000101001000010101000100101000010010100010010100100001010001001010000100
001000001000101000000010000100010000000000101000001000100000000010000000
000010010100010100101000100001001010001001010000100101000100100001010010
000001001000001000000000010100001000000000010001000001001000000000100000
001010001001000010100010010100001001010001001000010100100010100100001001
000100000100010100000001001000010000000001010001000000100001000000001000
010001001000010100100010100001001000101000010010100010010100001001000100
001000001010000000001000000100100000000010000100000000000101000001000000
000100100010100101000010010001010010100001001000101000010010100010010100
000001001000000000100001001000000100010000000001010000100000010000000000
001010000100100010100010010000101000100101000010010100010010100001001000
000001010000000100010000000001001000000100010000000000101000000100001000
010000100101000100100001010010001010010000101001000101000010010001010000
000000101000100001000000001000100000010010000100000000001000001000000010
000010010100010010100001000100101000100100001010001001010000100101000100
000000010010100001000000000100010000001010000100000000010000010001000000
001010001010010000101000100101000010010001010000100101000100101000010010
000100000001001000010000000001010000000000010000100100000001010001000000
000100101000010010100010010000101000100101000010010001010010000100010100
001000000010001010000000001000100000001001000000000010000101000000001000
010010000101000100101000010010001010010000101001000101000010010001010010
000000010010001000000000101000010000000100100000100000001010000100010000
001000101000010010100010010100000100101000100101000010010100010010101000
001000001000100000000100100000100010000000000010010000010001000000000010
000101000100101000010010100010010100001001010001001000001010001001000100
000100001000000010100001000001001000000001010001000000100000000001000010
001010000100100010010100001001010001010000100101000010010100010010100001
000001001000000000100010100000010000000000100010000010010000000001000000
010001001010000100100010100101000010010100010010100001001000101000010010
000000010010100001000000000010010000001000100000000001001000001000000000
000101001000010100100010010000101000100101000010010100010010100001001000
000100000101000000001000100000000100100000100000000000100010100000010000
001010001001010000100101000100101000010100100010100100001010001001000010


Here are a few interesting observations:

• In this reduced image, there are almost no two horizontally adjacent white cells.
• It is extremely rare that a horizontal black or colored run between two white cells has the same size as the next run.

Here are the run lengths, again for your copy-paste convenience:

6 1 7 3 3 2 3 9 5 2 7 8 4
5 1 2 1 2 1 3 3 2 4 2 1 3 2 4 1 3 2 1 4 1 0 2
6 1 2 3 2 1 4 2 5 12 3 7 10 1
3 3 1 2 3 2 1 2 4 2 3 1 2 4 1 3 2 4 1 2 3 1
8 6 1 12 7 3 8 1 12 5
2 3 3 2 1 3 1 4 2 3 1 4 2 3 1 2 4 1 3 2 1 3
11 5 1 0 6 2 3 11 5 2 9 6
1 3 2 2 2 3 2 3 2 4 3 1 2 4 1 3 2 4 1 3 2 1
14 8 5 3 14 7 2 7 4
2 1 2 1 3 1 2 3 1 2 4 2 1 3 2 4 1 3 2 4 1 3 2
5 2 1 8 8 4 2 12 3 8 7 1
3 1 2 1 3 4 7 3 2 4 1 2 3 1 5 2 1 3 2 1 1
1 4 2 1 2 11 5 2 9 4 1 12 6
1 4 2 3 1 4 2 3 5 3 1 2 4 1 3 2 1 5 2 3
5 4 2 15 2 8 4 3 11 1 7
3 4 2 3 4 2 7 3 1 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10 5 7 1
4 2 1 3 2 1 4 3 2 1 3 2 4 1 3 2 1 4 2 1 3 2
7 2 1 4 9 3 6 1 4 9 5 3 6
2 1 3 1 2 4 1 3 2 1 4 2 3 1 4 2 1 3 2 1 4 2 1
3 7 2 4 9 1 11 4 2 7 1 3 6
3 2 1 4 2 1 3 2 4 1 3 2 1 4 2 3 1 2 4 3 1 2
2 7 3 1 9 3 7 2 10 4 1 8 3
1 2 4 1 3 2 1 4 2 3 1 2 4 1 2 3 1 4 2 3 1 2 1
7 2 3 9 1 4 7 2 5 7 1 4 3 4
2 3 1 4 2 1 3 2 1 5 2 1 3 2 1 4 2 1 3 2 1 1 3
2 5 3 8 2 5 3 11 2 5 3 10 1
3 1 3 2 1 4 2 1 3 2 1 4 2 1 3 2 5 1 3 2 3 2
3 4 7 1 4 5 2 8 1 3 6 10 4 1
2 1 4 2 3 2 1 4 2 1 3 1 4 2 1 4 2 1 3 2 1 4
5 2 9 3 1 6 10 3 5 2 9 6
1 3 2 1 4 2 3 1 2 1 4 2 1 3 2 1 4 2 3 1 4 2 1
7 2 1 4 10 2 6 3 10 2 5 9
3 1 2 4 1 2 3 2 4 1 3 2 1 4 2 1 3 2 1 4 2 3
3 5 1 8 3 8 2 5 11 3 1 6 4
2 1 3 2 1 4 2 1 3 2 1 4 1 2 3 1 2 4 1 3 2 4 1


Note that the black stripes contain many more gaps than the colored stripes, and that black stripes are almost always some length between 1 and 4.

As far as I can tell, the few cases where the aforementioned observations are violated seem like transcription errors.

• I didn't think the bw rows were data free. It looks like a similar pattern to the colored rows but with the space done by a long white. So basically groups of black stripes (same as the colored lines which also seem to be groups of black stripes) – Dr Xorile Jan 17 '20 at 15:50
• Yeah, the b/w rows are not data free, as seen in the reduced image, but the b/w columns are perfectly regular. – Magma Jan 17 '20 at 15:53
• Based on those run lengths (many of them very long), I think we can rule out Morse code. – Earlien Jan 19 '20 at 2:18
• Suppose it's a 6-bit code, converting to hex and then to CDC1604 Magnetic (a hunch that didn't work). Then the first line gives me " Q28M_1182 _" which would fit " UNWRITTEN I" (Professor E, Processor E) also fit ... in all likelihood the " " isn't a space though. Replacing " " with "=" for the first 3 lines I get "=Q28M_1182=_1SN4S4QM09_Q8N_N58USK_R5". – pbhj Jan 19 '20 at 23:29
• Yo, great job done here. Just FYI, the 31th line (4th blue row) has a single mistake - the 3rd bit, right to left, should be 0, not 1. The rest of the data is correct. – araraonline Jan 20 '20 at 0:10

On the black/white rows, there is 6-bit code/encoded data (the original orientation is up-side down.) Here are 'paste bins' of the data/code in various formats:

IBM Punch-card data: https://pastebin.com/dGH8Lxam

Secondly, the colored rows create a pretty decent musical sequence. Whether or not that's what they actually represent, I'm not sure, but they do sound pretty good:

All Colored Rows - https://onlinesequencer.net/1359351

All Colored Rows besides yellow - https://onlinesequencer.net/1354805

Lastly, I created a tool to help with manipulating the data in the painting, such as creating musical sequences/morse code, and decoding the data as binary in a programatic fashion.

You can find that tool here: https://scret.net/encoded-painting/

Some observations that might eventually amount to something, or not:

Without the artist's signature, it's hard to know if the painting is oriented as intended. It could be upside-down. It could be sideways too, but I for one find it more aesthetically pleasing in portrait position.

When we do get it right side up, there's no guarantee that the information reads off from left to right, top to bottom, but that's what I'd try first.

The sequence of colors is so little information that it could mean anything. Perhaps there will be a satisfying explanation for it in the end, but I doubt it's a good place to start.

If the white rows and the color rows are paired in any way, most likely the color row pairs with the white row immediately below it, because that avoids leaving unpaired rows at the top and bottom.

The monotonous sequence of marks on the color rows makes it very obvious exactly how wide the marks are on the white rows. We can treat it as a timing signal of sorts. The white glitches in the color rows only ever replace color, never black; that is, they are at odd positions, counting from the left.

There are many fewer white glitches in the color rows than there are wide white gaps (or white glitches) in the white rows. They could be encoded completely differently.

The white glitches' neighbors in the white rows are always either black marks, or the middle of wide white gaps. But this is also true of all the colored cells in the color rows. It is a consequence of the structure of the white rows.

Not a consequence of the structure of the white rows: White glitches in the color rows are next to black marks in the white rows much more often than they are next to wide white gaps. And this is not because wide white gaps are rare. Something is steering the white glitches away from them. No idea what to make of this, though.

In the white rows, the runs of white are always one or three units long. The black marks are always one unit. In correctly timed Morse code, the dits are one unit, the dahs are three units, and either element is followed by one unit of silence. If it's Morse in the white rows, it probably runs from right to left, because they always have white at the right edge. But there are two good reasons I don't think it's Morse.

First: Correctly timed Morse has two additional units of silence (total three) between characters, and four on top of that (total seven) between words. Obviously there are no black marks three or seven units wide.

I played with the idea that a white glitch in the color row substitutes for the inter-character space, and the inter-word spaces are left out (as they are in most classical cryptography). That only explains the glitches with black neighbors, not the glitches with white ones. But more fatally, it didn't make any sense out of the left end of the first white row. Reading it from left to right, it goes 4T@DDND and then di-dah-di-dah-dah-di-dit which isn't a character at all. Also, @ wasn't part of the code yet when this was painted (the 1960s, from discussions elsewhere). Reading the same span from right to left, di-di-dah-dah-di-dah-dit isn't a character either, and after that it's UAUU(T6 ... doesn't look good. Doesn't work any better if we use the glitches on the red row, either.

So is it Morse, but with the inter-character spaces gone too? That would be a heck of a thing to decipher, especially in the 1960s. If you know the statistical properties of the underlying character stream, like if you know it's in English for example, there is an algorithm for finding the most likely sequence of characters that would have emitted the dits and dahs, but that algorithm was cutting-edge in 1967, and the computing power it requires wasn't easy to come by back then either. (Nowadays your phone infers the most likely word that would cause you to hit your on-screen keyboard where you did, with probably more computing power left over than there was in the entire world in 1967.)

That would be kind of fun to try and decipher. But there's a second, subtler, stronger reason it's not Morse: Every single white row has a black mark on the right end. Never once does the line break come in the middle of a 'dah'. If it's Morse, somewhere around half of the lines should do that. I mean, yeah, technically the painter could have designed a Morse message to hit all the line breaks cleanly, but it would take way more obsessive attention to detail than painting this thing already took. More likely it's just not Morse.

That same fact rules out any kind of variable-length coding, in fact. If ever we say "3 white means this, and 1 white means that" we get stuck explaining why the line break never hits the middle of 3. It's got to be fixed-width or the framing doesn't work out.

Per another answer, in each row there are only 72 informative (i.e., non-predictable) positions. Unfortunately that gives us a wide gamut of possible widths for a fixed-width encoding: 2, 3, 4, 6, 8, 9, 12, 18, 24, or 36. Okay, the really wide ones are out because there are too many possible codes. You might think the really narrow ones are out, because there are too few possible codes -- take them two at a time, you can decode that to a 4-symbol alphabet, whoop-de-do, that's real informative, right? You're probably right. There's an outside possibility that those small alphabets could be representing English via a variable-length code of their own, but how's that supposed to be decipherable?