# Distance metric for (infinite) lines in 3D

I would like a metric $d(\;)$ between pairs of (infinite) lines in $\mathbb{R}^3$, with these properties:

• If two lines $L_1$ and $L_2$ are parallel and separated by distance $x$, then $d(L_1,L_2) = x$.

• $d(L_1,L_2)$ increases with the degree of skewness between the lines, i.e., the angle $\theta$ between their projections onto a plane orthogonal to the shortest segment connecting them (dashed below), where $\theta=0$ for parallel lines and $\theta=\pi/2$ for orthogonal lines.

Intuitively, I would like the metric to be related to the repulsive force between two electrically charged lines (but it need not be exactly the actual physical force).

Have such metrics been considered in the literature? If so, I'd appreciate descriptions and/or pointers—Thanks!

Update1. It turns out that the natural ad hoc definition (from the comments) fails to be a metric. For example, below, a sufficiently large value of $a$ ensures the triangle inequality will be violated:

So this question may be more difficult than it initially appeared...

Update2. The responses to this followup MO question have revealed that in fact there is no metric that satisfies my two conditions (and is continuous w.r.t. $\theta$)!

• Can we put $d(L_1,L_2) = \lambda(L_1,L_2) + \theta(L_1,L_2)$ where $\lambda$ is the length of that shortest segment, and $\theta$ is the angle, or that's not a metric? Or you rather ask for all possible $d$ satisfying those two properties? – Ilya Jul 19 '13 at 12:52
• @Ilya: Yes, I can think of many ad hoc definitions, but I would prefer something more principled, connecting to other research. – Joseph O'Rourke Jul 19 '13 at 12:55
• I see ${{{}}}{}$ – Ilya Jul 19 '13 at 12:56
• I think the ad hoc metric $\lambda + |\theta|$ is pretty natural. I can think of one simple variant: $|\sin\theta|$ instead of $|\theta|$. Anyway, it does not seem to reduce ad-hocness that much. – Tunococ Jul 19 '13 at 13:21

You could use to sum of the "usual" metric distance $d(A,B) := \inf_{a\in A, b\in B} \Vert a-b \Vert$ plus a distance measure on the angle Vectors $\theta \in S_2/\pm$. i.E. $$m(L_1, L_2) := d(L_1, L_2) + \Vert \theta_1 \times \theta_2 \Vert$$ where $L_1 = \{ x_1 + t \theta_1, t\in \mathbb{R} \}, L_2 = \{ x_2 + t \theta_2, t\in \mathbb{R} \}$
• That's what the euclidean norm does here, assuming $\theta_1, \theta_2 \in S^2$, i.e. $\Vert \theta_i \Vert = 1$ – AlexR Jul 23 '13 at 10:27