Timeline for Efficient way to generate random points with a predefined lower bound on their pairwise Euclidean distance
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 31, 2020 at 2:07 | comment | added | A little mouse on the pampas | Your code needs to be updated to accommodate the new version (such as 12.0). | |
| Apr 9, 2013 at 14:32 | comment | added | Szabolcs | @PlatoManiac The big problem with calculating the probability distribution and using that is that the points positions are not independent, and can't be independently generated ... so we're back to square one. | |
| Mar 5, 2012 at 23:21 | history | edited | Sjoerd C. de Vries | CC BY-SA 3.0 | added 61 characters in body |
| Mar 5, 2012 at 21:31 | comment | added | PlatoManiac | @ArchimedesofSyracuse This is what I am doing with this ind of disjoint squares last one hour. Not an easy implementation for me. On the other hand I also think we can try to compute the probability distribution explicitly by hand. Then use this distribution in MMA to find the points. But may be it is more difficult mentally than efficient code writing.. | |
| Mar 5, 2012 at 21:22 | comment | added | Archimedes of Syracuse | @Verbeia That is correct, when there's no more space for new points, RandomChoice will return an empty list. I just illustrated the context without a robust implementation. Ideally this method could be used to weed out positions where a new point definitely can't be placed, on a square grid. Then choose a cell in the grid, and randomly position a new point inside. Then do another test to see if the point is too close to any points in nearby cells. This will give a method which is both fast and precise, but it's some work to implement it right. | |
| Mar 5, 2012 at 21:03 | comment | added | Verbeia | This is a very creative answer, +1! There seems to be a relationship between the dimensions of canvas and the maximum number of possible iterations in the Nest function (and therefore number of points). Changing the 150 to 180 without also increasing canvas gives a range of errors including RandomChoice::lrwl: "The items for choice {} should be a list or a rule weights -> choices." | |
| Mar 5, 2012 at 20:39 | history | answered | Archimedes of Syracuse | CC BY-SA 3.0 |