This livebook shows how to generate 2-dimensional blue noise via Elixir Nx.
This is a translation from Python to Elixir of the original Python/Numpy version
Video Demo | Jupyter Notebook with further examples This is an interactive demonstration of the Void and Cluster algorithm for generating blue noise. There are already plenty of excellent explorations on how and why to generate blue noise, and noises of other color. The Void and Cluster algorithm is one of several promiment algorithms. Some advantages over other algorithms are that the blue noise is of very good quality and that only the first step in the algorithm is non-deterministic.
The goal of this livebook is to provide additional insight by visualizing the core idea of this algorithm.
This insight might be used to better unstand the algorithm itself, for example to recognize potential performance improvements. But it might also be used as source of inspiration on how to design a custom algorithm. The algorithm below is implemented in Nx using an array oriented style. In this regard it can also be used as a case-study on how a sophisticated algorithm (that may take multiple hundred lines in C++) can be written very succinctly when relying on higher level concepts, such as convolution and rank-polymorphism.
Addtionally this notebook contains an example of how to use blue noise to blur an image using 1SPP convolution.