nargil

12-02-2009 17:00:38

Actually it's not Paged geometry related, but its the best forum I could think of, to ask the question.

I wan't a

**nice** algorithm to generate [about 20-100] random tree positions (x,z) in that way, that each tree is at least K meters away from the other ones (it may be more than K meters - since it's random, but never less).

PS. bruteforce isn't nice

Shadow007

13-02-2009 08:39:36

You may want to research the following terms : Poisson-Disk Distribution

For such a small number os samples, I think that brute force (ie dart throwing) may be the best solution...

maybe Blue Noise may interest you ... The difference is that with "blue noise properties", the "separation" between two samples is dependent of an input "density" map...

Some interesting work is "Recursive Wang Tiles for Real-Time Blue Noise" (2006)

Link :

http://johanneskopf.de/publications/blue_noise/
It features source code, and a precomputed tile set, so is quickly usable ...