Using recursive backtracking to implement Wang Tiles to "randomly" create an image from smaller images that are similar.
I use recursive backtracking algortithm to implement wang tiles on a area with dimensions that are defined by the user during run time. The user can also choose if they want the tiles to be displayed in a normal grid starting at the top right corner, going row by row and finishing at the bottom right corner; or they can choose to display the tiles in a spiral that starts in the center of the grid. I also used python 3.5.2 as of now.
I use the Zelle graphics library to draw the wang tiles or place the images onto the screen in the correct order. I plan on changing to a better library whenever I have free time with school. But this library is very easy to learn if you’re not too experienced.
Just go to mcsp.wartburg.edu/zelle/python/ and save the “graphics.py” file to:
Windows: C:\Python35\Lib\site-packages (or wherever your python installation directory is)
Linux: /usr/local/lib/pythonX.Y/dist-packages/
This person has a fantastic website (http://www.cr31.co.uk/stagecast/wang/intro.html) talking about wang tiles and he has many example sets of pictures to use with it to show the fluidity of the matching the edge pieces together. I use some of the picture sets that he has on there as demonstration of wang tiles while I try to create my own. Checkout out the other topics on his website too, at http://www.cr31.co.uk/index.html.