Calculate point on line, perpendicular and intersecting another line in 3d space

  • Thread starter WLamers
  • Start date
  • #1
4
0
Hello All,

I am looking for a way to find a point on a line (eg. line 1). This line has a perpendicular which has an intersection with another line in 3d space (line 2).

I have the coordinates of line 1 and 2 and their direction vectors (lines have an infinite length). I also have the distance between the two lines. Can anybody help me with this problem?


Thank you in advance!
 

Answers and Replies

  • #2
Filip Larsen
Gold Member
1,423
333
It is fairly straight-forward to find the minimum distance between to parametric lines. Write the two lines as a function of, say, parameters s and t. Calculate the squared distance between the two lines will give a quadratic function in s and t which can be differentiated and equated to zero. This gives two equations in the two unknowns s and t which can be solved for unique s and t if the lines are not parallel (the vector product of the two direction vectors must be non-zero). These values can be inserted into the parametric lines to find the actual points. If the lines are parallel there are infinitely many lines connecting them at minimum distance, so you can choose one parameters, say s = 0, and insert this in either of the two equations from which t can be found.

If you can positively state that this is not homework, I you can probably persuade me (or someone else here) to write up the actual calculations following from the above procedure. Or you could try look it up in a textbook on geometry or computer graphics where this is a commonly described problem.
 

Related Threads on Calculate point on line, perpendicular and intersecting another line in 3d space

Replies
6
Views
6K
Replies
1
Views
1K
  • Last Post
Replies
8
Views
4K
  • Last Post
Replies
5
Views
3K
Replies
1
Views
3K
  • Last Post
Replies
9
Views
3K
  • Last Post
Replies
1
Views
1K
Top