Skip to content

natyavidhan/wfc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wave Function Collapse

Wave Fuction Collapse python implementation, with Auto-Color detection

How to run?

  • make a python virtual environment: python -m venv env
  • activate the environmen: ./env/scripts/activate
  • install the requirements: pip install -r requirements.txt

to run the simulation

  • run main.py: python main.py OR
  • change directory to examples: cd examples
  • run better_roads.py: python better_roads.py

to export image

  • change directory to wfc_PIL: cd wfc_PIL
  • run main.py: python main.py
  • the image is exported as output.png in the same folder

extra

  • press r to restart the simulation

How?

In auto-color detection, with the help of Pillow, the program gets 3 points from each side of a particular tile, then stores them as side value instead of pre-defining it

Screenshots

Auto Color detection

basic

Pre defined sides

basic

About

Wave Fuction Collapse python implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages