# Point of closest approach

This topic is 3981 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I would like to calculate the point on each of two lines in 3D space at which they are closest. So for example given A = { 0 , 0 , 0 , 1.0 , 1.0 , 1.0 } and B = { 0 , 0 , 0.5 , 1.0 , 1.0 , 0.5 } it would determine that the point of closest approach was at { 0.5 , 0.5 , 0.5 } and { 0.5 , 0.5 , 0.5 }. The lines may not necessarily cross one another.

##### Share on other sites
Quote:
 Original post by abachlerI would like to calculate the point on each of two lines in 3D space at which they are closest. So for example given A = { 0 , 0 , 0 , 1.0 , 1.0 , 1.0 } and B = { 0 , 0 , 0.5 , 1.0 , 1.0 , 0.5 } it would determine that the point of closest approach was at { 0.5 , 0.5 , 0.5 } and { 0.5 , 0.5 , 0.5 }. The lines may not necessarily cross one another.
This problem can be solved pretty easily using minimization (or a geometrical approach).

Here is the first hit from Google for 'closest point two lines'; you should be able to find what you need there.

thanks :)

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 14
• 18
• 19
• 11
• 9