Fast Poisson Disk Sampling [Robert Bridson] in Python

风流意气都作罢 提交于 2019-12-02 06:49:00

A1: yes, checking these cells is sufficient if the cell size equals r/√2.

Just by looking at the x coordinates, three more cells could be excluded, and likewise three cells because of their y coordinates, but is it worth the effort? Not until you've implemented the algorithm and can test performance.

A2: No, I don't think this will be tricky. The point at (x, y) occupies cell (⌊√2 x/r⌋, ⌊√2 y/r⌋). New points will be rejected if they are either in an occupied cell, or if any of the 21 cells contains a point that is too close.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!