I have a question that I would like to share with you in case you could help me. I am working on 3D lines and I need to obtain the exact points at which the minimum distance of two intersecting lines is located. Why do I need these points?
Of each one of the infinite lines, I would only be interested in knowing if this minimum distance is in a certain range from that of points on the same line. For example, I have the points P (0,0,0) and Q (10,10,10) of a line r and I would only be interested to know if said minimum distance is in that coordinate interval or not.
To obtain the distance, I use the formula:

But once said I do not know how to ensure if such a minimum distance is reached within the range of values of P and Q that I comment above.

If anyone has any better ideas on how to check this or knows how to get such points, I would really appreciate it.