The metric space structure on projective plane It is well-known that the real (resp. complex) projective plane is endowed with a Riemannian metric $g_{FS}$ (resp. $\omega_{FS}$, where we ask for a hermitian form on each tangent space). However, I'm concerned with computing distances associated to this metric. Let me recall briefly the definition (assuming everything works just fine, which poses no problem in the case of projective spaces here):
Definition: Given a Riemannian manifold $(M,g)$, we can define the distance $d_g(p,q)$ between two points $p,q\in M$ as follows: $$d_g(p,q)=\inf\bigg\{\int_0^1\sqrt{\langle\gamma'(t)|\gamma'(t)\rangle_{\gamma(t)}} \, \mathrm{d}t \; \bigg|\;\gamma:[0,1]\to M,\;\gamma(0)=p,\,\gamma(1)=q\bigg\}.$$
That is, we take all paths from $p$ to $q$, and we take the infimum of their lengths.
I am willing to compute that distance informatically. I am given two points $p,q\in{\bf RP}^2$ or ${\bf CP}^2$ in homogeneous coordinates: $p=[a_1:b_1:c_1]$ and $q=[a_2:b_2:c_2]$. In the real case, I know that we can represent the projective plane by a disk whose antipodal boundary points are identifies. This gives a map from the closed unit disk $\overline{\bf D}^2$ to ${\bf RP}^2$ that is almost one-to-one: $$\varphi(x,y)=[x:y:\sqrt{1-x^2-y^2}].$$
Indeed, it is one-to-one on the interior ${\bf D}^2$, and two-to-one on the boundary (that boundary gets mapped to the line at infinity in ${\bf RP}^2$). Moreover, on the hyperbolic disk, we know what the geodesics are. However, I don't know if the geodesics for the Poicaré disk model are the same as for the “usual” projective plane. If that were the case, is the following method correct?
$\;(1)\;$ Find disk-coordinates $\varphi^{-1}(p)$ and $\varphi^{-1}(q)$ for $p$ and $q$.
$\;(2)\;$ Compute the geodesic $\gamma$ on the disk model.
$\;(3)\;$ Obtain a geodesic $\varphi\circ\gamma$ from $p$ to $q$.
$\;(4)\;$ (Somehow?) compute the integral $\int\|\varphi\circ\gamma\|$.
And even though it would be mathematically correct, I strongly suspect that steps $(3)$-$(4)$ are very inefficient computer-wise... Another issue I can spot: how to adapt this to the complex projective plane? By taking the 4-ball as the product of two unit disks in ${\bf C}$ and doing something similar?
Question: How to (algorithmically) compute the Riemannian distance on the projective plane, given two points in homogeneous coordinates?
Maybe the question is just very stupid and there is a plug-and-play formula that exists? However, after hours of searching, I still haven't found this holy grail!
 A: You can solve this problem quite easily by ignoring the disc quotient picture of $\mathbb RP^2$ and instead employing the two-to-one $S^2$ quotient picture, i.e. using the quotient map
$$q : S^2 \mapsto \mathbb RP^2
$$
This map is also given in homogeneous coordinates, but the formula is much simpler:
$$q(x,y,z)=[x:y:z] \quad\text{for all $(x,y,z) \in \mathbb R^3$ such that $x^2+y^2+z^2=1$}
$$
The advantage of this point of view is that you can reduce the problem of computing $\mathbb RP^2$ distances to a computation of $S^2$ distances, where the solution is known using standard facts of spherical geometry.
Each $P \in \mathbb RP^2$ has exactly two points in $S^2$ that represent it, and those two points form a pair of antipodal points. Namely:
$$q^{-1}(P) = \{\underbrace{(x,y,z)}_Q,\underbrace{(-x,-y,-z)}_{Q'}\}
$$
for some $Q=(x,y,z) \in S^2$, and so $x^2+y^2+z^2=1$ and $P = [x:y:z]=[-x:-y:-z]$.
So suppose you are given two points $P_1,P_2 \in \mathbb RP^2$ that are represented in this fashion by antipodal point pairs in $S^2$:
$$q^{-1}(P_1) = \{\underbrace{(x_1,y_1,z_1)}_{Q_1}, \underbrace{(-x_1,-y_1,-z_1)}_{Q'_1}\}
$$
$$q^{-1}(P_2) = \{\underbrace{(x_2,y_2,z_2)}_{Q_2}, \underbrace{(-x_2,-y_2,-z_2)}_{Q'_2}\}
$$
The distance in $\mathbb RP^2$ between $P_1$ and $P_2$ is equal to the minimum of the distances in $S^2$ from one of $\{Q_1,Q'_1\}$ to one of $\{Q_2,Q'_2\}$, and the latter distances can all be computed using spherical geometry.
The key fact is that spherical distances are all computed along great circles. So, draw the unique great circle that passes through $Q_1,Q'_1,Q_2,Q'_2$ and find the shortest distance along that circle from one of $Q_1,Q'_1$ to one of $Q_2,Q'_2$. You'll need spherical geometry formulas to do these computations, but that point is that these formulas are standard.
The outcome will be one of two possibilities:
$$d(P_1,P_2) = d(Q_1,Q_2) = d(Q'_1,Q'_2) < d(Q_1,Q'_2) = d(Q'_1,Q_2)
$$
or
$$d(P_1,P_2) = d(Q_1,Q'_2) = d(Q'_1,Q_2) < d(Q_1,Q_2) = d(Q'_1,Q'_2)
$$
