Simple Poisson disks
18 July 2023
Yesterday, I found a simple means of generating Poisson disks which is quite fast, and maybe a little simpler to implement than Bridson's algorithm.
- Create a rectangular sliding window, initialy at the top of the screen. Its width must match the screen width, and its height should be relatively small.
- Create a constant-sized queue Q, which stores the last 100 (say) accepted disks.
- Generate a disc with a center picked randomly in the window.
- If this disc does not collide with any disc in Q, accept it and add it to Q.
(If the size of F exceeds the maximum limit of 100 discs, remove the oldest disc to maintain the queue's size).
- Else, slightly shift the window downwards.
- Goto 3
Here is a result of this algorithm. Note that the yellow strip is the sliding window, that the disks in Q are in red, and that I set the maximum size of Q to 160.