jump flood algorithm

last updated: Oct 20, 2023

https://en.wikipedia.org/wiki/Jump_flooding_algorithm

The jump flooding algorithm (JFA) is a flooding algorithm used in the construction of Voronoi diagrams and distance transforms

The JFA has desirable attributes in GPU computation, notably constant-time performance. However, it is only an approximate algorithm and does not always compute the correct result for every pixel, although in practice errors are few and the magnitude of errors is generally small

via this news.yc discussion of a nice post from the author of the neat kidz fun art that they coded for their kids. (situated software!)

here's an implementation of JFA on observable with some knobs you can turn

↑ up