MathOverflow will be down for maintenance for approximately 3 hours, starting Monday evening (06/24/2013) at approximately 9:00 PM Eastern time (UTC-4).
show/hide this revision's text 2 code

update

As Joseph O'Rourke points out in the comments, the code is not very good with (anti-)parallel configurations. What seems to work is to give either segment a slight perturbation.

As an example, here's an approximate geodesic ($n=10$ points) between a segment with endpoints $(1,0)$ to $(2,0)$ (orange) and a segment with endpoints $(-1,0)$ to $(-1+\cos(\pi+0.001),\sin(\pi+0.001))\approx(-2+5\times10^{-7},0.001)$. The distance between the endpoints is $\approx3-2\times10^{-7}$, but the length of the depicted approximate geodesic is 3.30 (with steps of about 0.367).

Interestingly, this approximate geodesic seems to break symmetry in two ways. First, the segments rotate clockwise while traveling left. Second, the picture doesn't have left-right symmetry, which means that the first half of the journey is different from the second half (an analogue of this can be seen in the example above too, which doesn't have reflection symmetry across the -45º line). Is the second effect just due to discretization or non-convergence of the minimization? I don't know how to show that the true geodesics must be symmetric if there's some symmetry relating the two endpoints.

code snippet for this:

a1 = {1, 0}; b1 = {2, 0}; a2 = {-1, 0}; b2 = {-1 + Cos[\[Pi] + .001], Sin[\[Pi] + .001]};Timing[anti3 = FindChain[{a1, b1}, {a2, b2}, 10]]SegmentDist2[{a1, b1}, {a2, b2}]Table[SegmentDist2[anti3[[i]], anti3[[i + 1]]], {i, 9}]Sum[SegmentDist2[anti3[[i]], anti3[[i + 1]]], {i, 9}]Graphics[Table[{Hue[i/Length[anti3]], Line[anti3[[i]]]}, {i, Length[anti3]}]]
        
show/hide this revision's text 1

What follows are just some illustrations, not a full answer; please refer to Anton Petrunin's answer for a nice description of the 4 dimensional geometry that the original question is embedded in.

Here's a bit of Mathematica code to generate some crude discrete approximations to geodesics. Given the two endpoint segments $s_0,s_1$, I create $n$ segments on the naïve $s_\alpha$ path I defined in the comments above, normalize their lengths to one, and then vary the positions of the endpoints of these intermediate segments with Mathematica's FindMinimum function to find an approximate geodesic. The code I wrote looks for a local minimum of an objective function with two terms: one is just the sum of the distances between all the intermediate segments and the other is a constraint that forces the distances between each pair of adjacent segments on the path to be equal (otherwise the intermediate segments all flow to the endpoints). The segments are all constrained to have unit length.

As Mathematica is not really good at a serious minimization problem, the code runs rather slowly (finding a discrete path with $n=10$ takes about 7 minutes), but perhaps you might still be able to get some more direct intuition for the geodesics by playing around with it in different cases. It's a start, anyways.

Below is an image of one example. The endpoints are a segment with endpoints $(0,0)$ to $(1,0)$ (orange) and $(1,0)$ to $(1,1)$ (red), and I approximated a geodesic with a chain of $n=10$ segments. The path begins with the orange segment sliding upwards a tiny bit to "yellow", and then the segments rotates counter clockwise and translate right until they reach red.

The segment distance between red and orange is $\frac{1}{8}\left(4+\sqrt{2}\log(3+2\sqrt{2})\right)\approx0.8116$, but the length of the approximate geodesic is $0.865$. Each pair of "adjacent" segments in the picture has a segment distance roughly 0.096 between them.

With $n=10$, the length has not converged to high accuracy! For $n=7,8,9$ the lengths of my approximations are $0.857,0.884,0.876$, respectively. In any case, it's clear that the length of the true geodesic will be greater than the distance between the endpoints. You might stare at this picture and imagine the true geodesic "hugging" the 3 dimensional unit length segment hypersurface in the 4D space, whereas the distance measures a "chord" through the 4 dimensional space of segments with arbitrary length.

10 point approximation to geodesic