# Calculating the distance function on a manifold, given the Riemannian metric in matrix form

I come from a CS background (and this is for a CS project) and as such my skills and knowledge of geometry are pretty poor. I'm looking at a bunch of points on a Riemannian manifold (let's say, for convenience, the hyperboloid) with a metric G (which, for the hyperboloid, I believe takes the form of a diagonal matrix whose first entry is -1 and the rest are 1s).

I want to calculate a sequence of Riemannian metrics [in matrix form - from what I'm aware, Riemannian metrics are usually rank 2 tensors, so the matrix form is just the (1,1) representation of such a tensor?], where each new element in the sequence is a function of the last. In other words, if we have $$G = G_0$$, $$G_n = F(G_{n-1})$$ for some arbitrary $$F$$.

Is there any way I can calculate the distance function on the Riemannian manifold corresponding to the new Riemannian metric? For instance, I know (unless I am mistaken) that the distance function on the hyperboloid is $$d(x, y) = arccosh(- x^T G y)$$ where $$G$$ is given as above, and that generally computing the distance function on a Riemannian manifold involves an arc length integral, so I'm wondering if there's any closed form I can find for that integral [not necessarily a solution], either based generally on a metric $$G_{n}$$ or on, say, $$arccosh(- x^T G_0 y)$$, $$F$$, and $$G_n$$.

Thanks!