Let $(M,g)$ be a Riemannian manifold embedded into $R^n$ with $g$ induced by the Euclidean distance of $R^n$ (i.e., this is an isometric embedding).
Suppose $x, y \in M$, and consider the Euclidean line segment $c(t) = (1-t)x + t y$ where $t$ is a scalar: $t \in [0..1]$. Now, define a curve $p(t) \in M$ by projecting $c(t)$ onto $M$. Thus: $p(t) = Proj_{M} (c(t)) = \arg\min_{p \in M} \|p - c(t)\|_2$.
I'm wondering if there is a relation between the geodesic on $M$ between $x$ and $y$ and the length of the curve $p(t)$ (which must lie on $M$ by definition).
Any simplifying assumptions such as $M$ being compact, without boundary and with a positive reach are OK in my context.
For example, if $M$ is a sphere, then it seems that $p(t)$ will trace the geodesic between $x$ and $y$, unless they are on the poles. Is there a characterization of this situation? Is this true locally (e.g., for $y$ in the neighborhood of $x$)? To me, it seems that $p(t)$ must provide a better estimate of the geodesic, but I cannot find relevant results. Thank you.