Intersection two lines and SVD?

109 Views Asked by At

Is it possible to calculate the intersection of two 3D lines using SVD? What would it look like?

Thanks

1

There are 1 best solutions below

6
On BEST ANSWER

Consider for example the system of 2 lines with resp. equations :

$$\begin{cases}x&=&0\\y&=&0\end{cases} \ \ \text{and} \ \ \begin{cases}y-z&=&0\\x&=&-a\end{cases}\tag{1}$$

where $a$ is a parameter. You have recognized in the first system the equations of the $z$ axis. The second represents a line with slope 1, parallel to (vertical) $x-z$ plane, at a distance $|a|$ from it.

Grouping the two systems in (1) into a single one gives rise to the following matrix :

$$\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&1&-1&0\\1&0&0&-a\end{pmatrix}$$

The 4 singular values of $A$ depend a priori on the value of $a$ (see remark at the bottom). They are graphicaly represented below (for a range of $40$ values of $a$ which are $-2,-1.9,-1.8, \cdots 1.9, 2$ explaining the scale on the right ; we can see that for the value $a=0$ and for this value only (for which the two lines are coplanar), the smallest singular value is 0.

Due to the continuity of these singular values with repect to $a$, we see that when $a$ is small but not zero, it can trigger our attention and even give a way to measure the proximity (shortest distance) between the two lines.

enter image description here

Fig. 1: $\textit{Singular values sorted in decreasing order for different values of $a$.}$

Remark : This graphical representation can be misleading ; in fact, two of the singular values are constant, with resp. values $\Phi\approx 1.618$ and $\Phi-1 \approx 0.618$ where $\Phi$ denotes the golden ratio ; these constant values cannot be spotted at once because of the sorting of the singular values. The two other singular values vary with formulas $\sigma = \sqrt{\frac12 \left(2+a^2 \pm \sqrt{a^4+4}\right)}$ which indeed can take value $0$ for $a=0$.

A somewhat better representation is this one :

enter image description here