Skip to content

My contribution to the coding challenge from The Coding Train.

Notifications You must be signed in to change notification settings

gritschu/Wave-Function-Collapse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wave-Function-Collapse

This is my contribution to the coding challenge from The Coding Train. I am not sure how to fork an existing project. This is why I downloaded the code, worked on it, and set up a new repo. :-| This is JavaScript with p5.js.

GIF animation of WFC algorithm

GIF animation of WFC algorithm

My changes

  • I designed my own tile system to create a rather simple abstract ornamental pattern.
  • I optimized by checking the entropy only for cells that are neighbours of already collapsed cells. Raised the performance a lot.
  • When stuck because there is no fitting tile for a cell instead of starting all over I reset the collapsed neighbours of this cell and try again to complete the grid. It is still stuck sometimes, but very rarely.

Future plans

  • Other designs
  • Movie clips / frame animations instead of images
  • Generative content instead of images for filling the cells (e.g. animated curves or shapes)
  • 3D grid
  • Hexagonal grid

About

My contribution to the coding challenge from The Coding Train.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published