Nov 4, 2023
I spent some time today playing with Poisson Disk Sampling (image 1), and I tried hard to avoid using any `print`s to the terminal, which forced me to create some nice debugging UI (image 2 and 3).
Animation showing Poisson Disk Sampling in action as described in https://sighack.com/post/poisson-disk-sampling-bridsons-algorithm
Another run, this time with some additional overlays. You can see a grid superimposed on the canvas, and it's clear that there's at most one dot per square. There's a ring moving about adding dots, but it's moving quite fast so further detail is difficult to discern.
This run uses a much coarser grid, and the animation is moving a lot slower. It's a little easier to see that the ring is centered on one of the rings (highlighted in blue), and a candidate point is chosen within the area of the ring (highlighted in green), it then checks for any existing points that are too close (green circle). In this manner some candidates persist on the canvas while others are erased.
This post is part of my Freewheeling Apps Devlog .
Comments gratefully appreciated. Please send them to me
by any method of your choice and I'll include them
here.