Geodesic math and how to use it