If you are interested in spherical math, you should check out google's S2 library [0] which uses hilbert curves to classify areas on a sphere. Here is an overview of the cell hierarchy [1]<p>[0]: <a href="http://s2geometry.io/" rel="nofollow">http://s2geometry.io/</a><p>[1]: <a href="http://s2geometry.io/devguide/s2cell_hierarchy" rel="nofollow">http://s2geometry.io/devguide/s2cell_hierarchy</a>
A somewhat related article recently on the HN front page - "Generating random points inside a sphere": <a href="https://karthikkaranth.me/blog/generating-random-points-in-a-sphere/" rel="nofollow">https://karthikkaranth.me/blog/generating-random-points-in-a...</a> ; <a href="https://news.ycombinator.com/item?id=17688599" rel="nofollow">https://news.ycombinator.com/item?id=17688599</a>