New Library idea: Wave Function Collapse Pattern

Hello, everyone! For GSOC 2022, I have an idea for a patterns library which could create all sorts of patterns from an input image following the tile model algorithm. Would like to hear if it is a valid proposal?


Cool idea! This library could be really nice to have and certainly counts as an addon library proposal. I’m trying to imagine how you might complement built-in functions such as image and texture.

What are you thinking in terms of the API?

In terms of API I am thinking something like output_img = pattern(img, size_of_pattern, width, height, [other options]). Now this output image could be drawn using the image function or filled as texture using texture function.

Nice idea. GitHub - allison-casey/wavefunctioncollapse may provide a starting point.

1 Like

I’ll start working on the proposal and will update soon

@mcintyre @micycle I am ready with the first rough draft of my proposal for the library.
GSoC’22 Proposal
Do read and add the comments in Google Docs wherever you feel it is required. And I would also like to get your opinion about the additional features mentioned in the proposal.

1 Like

Processing implementation by @noahbuddy :

One of the output images you are using in your document is actually based on this very imlementation. Also, I would suggest that you specify your sources (pictures you are using, authors of the algorithms you are mentionning):

The last images show the output from the algorithm invented by Anastasia Opara named MSTS (Multiresolution Stochastic Texture Synthesis - 2019). It is a better/improved version of the P.F. Harrisons’ algorithm (linked at the end of your document) as explained here:


thanks @solub for these excellent resources!! I will surely mention all the image sources. :slightly_smiling_face:

@mcintyre what project size and proposal title should I put for this proposal?

@anexas your proposal is off to a great start! I requested access to leave comments. In the meantime, have a look at proposals from students that I mentored in past summers.

A few suggestions come to mind:

  • Tell us about yourself!
  • Provide a more detailed preview of the library’s API.
  • Include multiple example sketches.
  • We are not code snobs… but… camelCase is standard in JavaScript.
  • Consider using TDD.
  • Plan to document your code from the outset.
  • Plan to write tutorials.
  • Add a bit more detail to your proposed timeline.
  • Incorporate @solub’s note about MSTS.
  • Consider naming the library p5.texturesynth (following the pattern here).
1 Like

Thanks @solub for sending this wonderful talk by Anastasia Opera.
@mcintyre I have incorporated your suggestions into my proposal please take a look.

I added a few comments :+1:t4:

1 Like

@mcintyre I have made the requested changes, please take a look. Also what would be the project size according to you, 175h or 350h?

Your proposal is in great shape! I made another small suggestion in your example sketch.

It seems likely that you could deliver a useful library in 175h, but planning for 350h would guarantee time to work on those additional features. Personally, I’d love to play around with procedural texture generation and MSTS.

1 Like

Thanks, I will try my best to deliver as many additional features as possible.

1 Like