https://github.com/dthe223/wang-tiles-2d
Using recursive backtracking to implement Wang Tiles to "randomly" create an image from smaller images that are similar.
https://github.com/dthe223/wang-tiles-2d
backtracking-algorithm python python-3-5
Last synced: 4 months ago
JSON representation
Using recursive backtracking to implement Wang Tiles to "randomly" create an image from smaller images that are similar.
- Host: GitHub
- URL: https://github.com/dthe223/wang-tiles-2d
- Owner: dthe223
- License: gpl-3.0
- Created: 2016-12-30T15:40:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-04-24T22:29:33.000Z (about 2 years ago)
- Last Synced: 2025-01-19T07:42:35.117Z (5 months ago)
- Topics: backtracking-algorithm, python, python-3-5
- Language: Python
- Homepage:
- Size: 234 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Wang-Tiles-2D
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.
# Zelle Graphics Library
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/
# Reference - cr31
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.