Let’s say you are trying to find the distance between two points in 2D, but that these points are in a universe that “wraps around” like old video games – leaving the screen on the right, left, top or bottom side makes you re-appear on the opposite edge.
This universe is actually shaped like a toroid, also known as a doughnut. If you imagine yourself being on the inside surface of a hollow doughnut, it would behave exactly this way. If you go “down” you end up where you previously considered “up”. If you go far enough “left” you end up where you previously considered “right”.
How would you calculate the distance between two points in a universe like this?
Let’s imagine the situation below where we are trying to find the distance between the red point and the green point:
One way to do this would be to pick…
View original post 666 more words