|
rajafaisal09 wrote:
>
>Hello ! To Every one .....
>
>Well i need to know about shortest distance b/w two Stright
>lines ....
>plz help me also tell me formulas and i'll be kindfull if u explain
>through examples .
>
What do you mean? You have two lines in a 3D [or more] space,
and you want to find the distance between them?
Such as line1 = { P | P = A1 + B1 t1 } and
line2 = { P | P = A2 + B2 t2 } where A1, B1, A2 and
B2 are vectors?
I don't want to solve the problem, but I will give a hint:
the _direction_ that is normal to both lines [provided that
they are not coplanar] in the 3D case is given by
the vector B1 ^ B2 [the vectorial product]. The segment
that joins both lines, then, will have a parametric equation
like segment = { P | P = A3 + B3 t3 for 0 <= t3 <= L },
where B3 = the unit vector of (B1 ^ B2), and t3 = 0 corresponds
to the point in line1, and t3 = L corresponds to the point in line2.
So we must solve:
(1) for t3 = 0 we have a point in line1 and the segment =>
A3 = A1 + B1 t1
(2) for t3 = L we have a point in line2 and the segment =>
A3 + L B3 = A2 + B2 t2
in other words, when you explode the vectors into the 3
components, there are 6 equations, and there are _6_
variables (A3, L, t1 and t2)
Solve it and you have the solution
[there might be a smarter solution than this]
Alberto Monteiro
|