Hacker News new | past | comments | ask | show | jobs | submit login
Godel Escher Bach QR Code shadow cube (thingiverse.com)
158 points by te_platt on March 7, 2013 | hide | past | favorite | 28 comments



Alas, I wish I had thought of this. I made a replica of the cube on the cover of GEB here:

https://cubehero.com/physibles/iamwil/shadowblock

It's actually not too hard to do with OpenSCAD or any other modeling tool that allows you to do intersections. So I've tried other three letter acronyms: https://cubehero.com/physibles/iamwil/shadowblock/print

For the QR Code Shadowblock in the OP, I wonder how he dealt with supporting all the structures within, but not all combinations of pixels on each face will work. Maybe he just played with it and rotated the QR codes to find a combination that will work.

I have thought about a QR Code Quine, where the QU Code contains an OpenSCAD file that is a model of the QR Code. However, I wasn't sure exactly how to tackle that, since the QR Code decoder is non-trivial.


Just in case anyone doesn't get it, it's a reference to the cover for Hofstadter's "Godel, Escher, Bach:"

http://en.wikipedia.org/wiki/File:GEBcover.jpg


The single most important book I think I've ever read. I've never read something that I kept coming back to year after year, reading a little farther into it every time. If I was stranded on a desert island with only one book, I'd bring this one. It would keep me busy for more than long enough.


At first I agreed with you, but then I realized that I'd be stuck on a desert island AND I'd feel stupid.


Absolutely. Especially because the whole book is about how things spring out of nothingness.


According to him that's what the books core idea seems to boil down to, but I think I'd bring the book with me because of all the other things as well: "fugues and canons, logic and truth, geometry, recursion, syntactic structures, the nature of meaning, zen buddhism, paradoxes, brain and mind, reductionism and holism, ant colonies, concepts and mental representations, translation, computers and creativity, consciousness and free will, sometimes even art and music of all things!" -preface to the twentieth anniversary edition


The only part of this that would be difficult is ensuring that there is no single dark pixel which is surrounded by all white pixels. As the dark pixel represents material and the white pixel is empty space, you'll need to use thin supporting structures within the QR margin of error otherwise there wouldn't be anything to hold the material in place. Do a Google Image search for "letter stencil" for what I mean by thin supporting structures.

That small caveat aside, it's super easy to construct: start with a solid block of material, take QR code 1, and from one face carve out the white pixels all the way through, keeping any thin connector pieces as required. Rotate to another face, do the same for QR code 2, rotate again, and do the last face for QR code 3. The remaining structure is what you 3D print.


>ensuring that there is no single dark pixel which is surrounded by all white pixels

You mean, like the registration and alignment markers in three of the four corners?


Did you even go to the link? First picture on the page obviously shows narrow diagonal connector pieces as required to support weak or unsupported components.


You must have misread my comment. I stated that the connecting pieces are the only hard part in generating such a cube, not that connecting pieces weren't used in the cube shown.

The next time you feel someone is in error, consider presenting your argument in a nicer tone. The use of "did you even" and "obviously" makes you seem like a dick.


This reminds me of a thing I keep not having the time to design and 3D print, so I'm going to say it here so someone else can make it for me.

Platonic solid Matryoshka "dolls".

Essentially, I would like to have a sphere (admittedly not a Platonic solid) which splits in half to reveal an icosahedron which splits in half to reveal a dodecahedron and so on through octahedron, cube and tetrahedron. Making them fit nicely one inside the other.


  Note that QR codes cannot be read in mirror image, so only
  3 of the 6 possible cube orientations cast a readable
  shadow.
Well, now I can't stop thinking about QR code rotations. How big is the subset of QR codes that are valid in more than one orientation? (some combination of rotated, flipped, or mirrored). Treating the marks for position/alignment/etc as a separate layer and flip/rotate/mirror the rest of the code.

What about the different sizes of code? Can it only be done with, say Version 4 and not Version 3 codes?


>How big is the subset of QR codes that are valid in more than one orientation?

Given the placement of the position and alignment markers in a valid QR code it looks like the only symmetry it can have is reflection (mirror-image) symmetry about its main diagonal (the line from the top-left to the bottom-right) [1]. If you take any given QR code and replace the part of it that is below the main diagonal with a mirror image of the part above it then in the worst case you will lose 50% of the information contained in the code (actually less since the pixels on the diagonal stay there no matter what). Now, the content of a QR code generated with the heaviest error correction settings can be recovered even if up 30% of its data is lost [2]. If you generate a QR code where the part above the main diagonal is similar enough to the one below it (meaning at least 50% - 30% = 20% of symmetrically located pixels are the same color) then such a QR code should survive being made fully symmetrical.

The above is a simplification, though, since, generally speaking, error correction in QR codes operates on blocks and not whole codes. In practice it also may or may not be possible to generate a sufficiently symmetrical code in the first place, let alone one with the specific content you want.

[1] See http://imgur.com/YMNIsgc. The red line show the diagonal, the green arrows point out pairs of symmetrical pixels.

[2] http://archive.is/20120915/http://www.tec-it.com/de/support/...


Can someone help explain how exactly this works? It casts a shadow that is a valid QR code? How does it cast a shadow? On what does it cast a shadow?

It looks awesome and someone clearly worked incredibly hard on it. I just want to understand it better.


It's meant to be 3D printed.

One you have that 3D printed cuboid in your possession, you point a flashlight towards one face, have the opposite face face a white surface, and scan the resulting shadow with a smartphone– and boom! It's quite insane.


The questions is, can any QR code be made to work or are you pretty limited in the info represented by the QR code?

I don't understand how QR codes work well enough to know the answer.


You can do this for any three sets of 1-bit images. There's nothing special except for ensuring that you have thin connecting pieces so that any "island" where material would otherwise be surrounded by empty space remains connected to other pieces.


Here[1] is the inspiration, perhaps it'll make it clearer. Imagine the letters that are projected onto the walls are QR codes.

[1]: http://en.wikipedia.org/wiki/File:GEBcover.jpg


I thought this was the inspiration - http://www.digitalsundial.com/.

Fractal Sundial gives a "digital" reading using the shadow cast by obscuring sunlight.


It looks like this is currently built for an infinitely distant light source. The sun might work, but you'd need mirrors to get the 3-shadow effect.

Fortunately, it should be relatively easy to tweak the shape for light sources at various distances. (though the easy way won't yield a cube.)


Text at link: This is a complex image. To get a readable shadow your light source will need to be pretty far away to get a flat pass through. Perhaps someday I'll do a version with transformed geometry, matching specific close-up point sources.


What about fresnel lenses? Maybe you could use a few to "straighten" the light from a nearby point source?


This is the first thing I have ever wanted a 3D printer for.


ditto, I was just about to post the same comment. I have been watching 3d printing long enough. I read GEB a long time ago and it was the book that convinced me to go into computer science.


    Note that QR codes cannot be read in mirror image
It should be simple to make a QR reader that also reads the image flipped horizontally and/or vertically. That way reflections of QR codes could be read too. Maybe some readers already do this. The use case ould be quite small though.


One use case would be windows with a QR printed on them.


Could this be printed with a 3D printer? I think that would be a fun thing to have sitting on a desk.


That is the very thing it has been designed for, from the beginning and through every step. The huge image on the linked-to site is of a 3D-printed object. Also, the site (Thingieverse) is a widely-known repository for 3D-printable object designs.

So: yes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: