# \[ANN\] WaveFunctionCollapse.jl

**URL:** https://discourse.julialang.org/t/ann-wavefunctioncollapse-jl/19187
**Category:** Package Announcements
**Created:** [January 2, 2019, 11:25am UTC](https://discourse.julialang.org/t/ann-wavefunctioncollapse-jl/19187 "2019-01-02T11:25:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Robert\_Honig](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/robert_honig/32/4930_2.png) [@Robert\_Honig](https://discourse.julialang.org/u/Robert_Honig)
#### Post date: [January 2, 2019, 11:25am UTC](https://discourse.julialang.org/t/ann-wavefunctioncollapse-jl/19187/1 "2019-01-02T11:25:30Z")

</div>

Hi all,

I’m announcing [WaveFunctionCollapse.jl](https://github.com/roberthoenig/WaveFunctionCollapse.jl), an implementation of the [WaveFunctionCollapse](https://github.com/mxgmn/WaveFunctionCollapse) algorithm.

[WaveFunctionCollapse.jl](https://github.com/roberthoenig/WaveFunctionCollapse.jl) procedurally generates arbitrarily sized images based on a single example bitmap.

As an example, take the input bitmap ![Flowers](https://global.discourse-cdn.com/julialang/original/3X/0/c/0c434637a27dfffaa5f497142e94a981a5c6d412.png).

The algorithm then generates the output image pixel by pixel: ![Flowers](https://global.discourse-cdn.com/julialang/original/3X/4/c/4cf3ea8623d4d45792f4ddfa95662a4cbe444e76.gif)  
(I added a `generate_gif` option that allows you to make these 🙂 )

The repo contains a [Jupyter notebook with more examples](https://github.com/roberthoenig/WaveFunctionCollapse.jl/blob/master/usage.ipynb).

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](https://github.com/roberthoenig/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!
