by frankfrank13 · 2y ago · 0 comments
1. Truncate your lat longs to some arbitrary decimal place (this is very very stupid, you end up with grid lines [1])
2. The above method ^^ but everyone tries basically doing like random angle + random length along angle, which doesn't generate uniform results in a circle as the article mentions[2]. So then you try generating points in a box that encloses your circle, and rejecting anything outside the circle, but that smells bad. So you do some googling and find method 6 listed in the article (Good! and Fast!)
3. Realize that fuzzing points is stupid, what you really want is to view points in aggregate anyways, so you try heat maps
[1]: Ok you always end up with grid lines, but truncating to like 1-6 decimal places produces very obvious grid lines to the human eye
[2]: Try this in pyplot! You'll see right away with ~100 points its not uniform in the way you expect
https://extremelearning.com.au/how-to-evenly-distribute-poin...
(N denotes the number of points you need to generate)
It might fail for higher dimensions, but lots of programs only run on a 3D sphere of a planet, haha!
I don't actually know of any useful algorithms with worse asymptomatic behaviour.
Most maps are 2-dimensional and this is fine.
Actually, it is an overstatement I think, or something orthogonal; the algorithm is still correct just wildly inefficient. Fail should be reserved for algorithms that produce the wrong result, not ones that produce the right result very slowly, however slowly.
Note: "asymptomatic" does not mean the same as "asymptotic"