Hacker News new | ask | show | jobs
by Rhapso 962 days ago
It's all fun and games until you leave the euclidean plane and calculate the real distance.
1 comments

Distance isn't so much a problem. The real problem is that the surface is closed.
Being closed really isn't an obstacle. For example you can solve a euclidean modulus toroid by just tiling the space once more around itself, running a vanilla euclidean solver and then unioning the 9 copies of the space.
If the pointset is degenerate (e.g. 4 points on a circle), then you may get different local results in different copies of the space and the unioning may be difficult.
Ah, I'm an engineer not a theorist. Such degenerate input is unlikely to be a valid use case, can be detected, and I can reject it.

Wait until you see the actual heuristic I use for solving voronoi/delaunay in arbitrary topologies. I need to write a blog post on it anyways.

It's very easy to get 4 points on a circle. In 2d space just the four corners of a unit square would do it.
On a sphere or modulus space, that just becomes a K4, so it isn't even an edge case, it is the solution that the approximation would generate.