[ANN] WaveFunctionCollapse.jl

Hi all,

I’m announcing WaveFunctionCollapse.jl, an implementation of the WaveFunctionCollapse algorithm.

WaveFunctionCollapse.jl procedurally generates arbitrarily sized images based on a single example bitmap.

As an example, take the input bitmap Flowers.

The algorithm then generates the output image pixel by pixel: Flowers
(I added a generate_gif option that allows you to make these :slight_smile: )

The repo contains a Jupyter notebook with more examples.

What sets the WaveFunctionCollapse algorithm apart from other procedural generation algorithm is that it operates almost completely self-sufficiently. Just supply it with a bitmap, and it does the heavy lifting of figuring out proper pixel adjacency rules for you.

For now, this package only implements the so-called “overlapping model” of the algorithm. This is the version that allows you to take a bitmap and generate arbitrarily sized images based on it. However, extending the algorithm to multiple deimensions, or predefined adjacency rules should now be rather straightforward.

WaveFunctionCollapse.jl can be used as a package in projects (with WaveFunctionCollapse.generate(...)), and also as a command line tool (with julia main.jl ...). Enjoy!