This application is based on a challenge that took longer to solve than expected.
License: MIT
The input image is a puzzle consisting of quadratic tiles.
This is the third attempt at sorting the tiles somehow. Hint: bouncy-spring-sort worked okay-ish too, but unfolding the mess in the center turned out to be very complicated.
- Compare opposite sides of a tile with each other tile
- Find the best matching sides
- Link the two tiles as "neighbours"
- Generate a 2D map of the newly connected tiles
- If there are overlapping tiles: Undo linking
TODO: Teach the problem to try/error different links.
Required libraries:
- PNG: libpng-dev (1.6.0+)
- ZLIB: zlib1g-dev
And of course, CMake and a C++ compiler.
Run the demo:
cmake .
make
./UnrandomEarthstar
Nobody said it's perfect, right?