Finding intersection of two lines in 3D space w/ Unit Vectors

655 Views Asked by At

I've recently started learning about 3D transformations in robotics and I was working through some problems on my own to get comfortable with working/visualizing in 3D. Now lets say I have two points (x1,y1, z1) and (x2,y2, z2) and I have unit vectors <x_u1, y_u1, z_u1> and <x_u2, y_u2, z_u2> associated with each of those points. Is there a way I can go from this information to a representation of 2 3D lines, which i can then find the intersection of

1

There are 1 best solutions below

0
On

Yes you basically have all the ingridients to create two lines. Each line can be created from a position and a direction vector.

More formally, having 2 points $p$ and $q$ with corresponding unit vector directions $u$ and $v$, you can define the parametric functions $L_1(t) = p + t u$ and $L_2(t) = q + t v$ where $t$ is a scalar parameter.

The intersection point can be found solving the following equation for $t_1$ and $t_2$:

$$L_1(t_1) = L_2(t_2)$$

$$t_1 u - t_2 v = q - p$$

Which is a linear system of equations i.e., it can be written in the form $A x = b$. If the system has a solution then it corresponds to the intersection of the lines.