Another option is to generate them without collision in the
first place. Instead of placing them at random location, go
through a grid of points with twice the necessary spacing and
decide randomly whether to place an object (or semi-randomly,
you can control the probability using a pattern function).
To avoid too regular placing, you can then add some random
offset or turbulence to the grid position (which is why you
need more than the maximum spacing in the initial grid).
Post a reply to this message
|