3 ms·
This post seems to barely scratch the surface of the problem. First you really need to specify by what metric you want the distribution to be uniform. Euclidean
by starmole 11y ago
This post seems to barely scratch the surface of the problem. First you really need to specify by what metric you want the distribution to be uniform. Euclidean 3d distance? Arcs? The way I would do it would be to generate a lot of random points by some easy scheme, like long/lat, then feed them into a kdtree (k=3), find all neighbors for every point with an overestimating metric, then check them against the real metric and remove the too close ones.
- j2kun 11y agoIt should be clear that the obvious notion of uniformity is the intended one. I.e., it should be uniform with respect to the usual Lebesgue measure on the sphere. And your method is extremely complicated. You can solve this problem with 5 lines of code and no data structures.