Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have nearly parallel several 3D line segments. some line segments locate (blue line) beside to a spefic line segment (black line) and some other (red line) locate away from that line segment. i want to know which line is away and which is beside. i hope to do it by projecting all the line segments to that specific line segment (black line) and..(however, i do not have a clear idea to do this... ). Also i am thinking to use mid point of red, blue lines and then to project those points onto the black line and test whether it is within the ends..... also, i am thinking to test perpendicular distance between lines..but it doesnt give correct answere i guess as we do not know small distances are always given by away lines or vise verse. however, I am looking for easily implementable method.! any help please.

enter image description here

Also inserted an image to make clear you. thank you in advance.

share|improve this question
Your problem seems subjective to me. If you project the red and blue lines onto the black line, you will see that the red line and the black line partially overlap; and likewise, the blue line and the black line partially overlap. If you look at perpendicular distances, the red line is closer to the black line than the blue line is. So it's not clear exactly what "beside" and "away" mean. My best guess is that two line segments are "beside" each other if and only if they are parallel edges of some rectangle; is this correct? –  Tanner Swett Mar 23 '12 at 16:17
By the way, if your question still makes sense in two dimensions, it is probably a good idea to make a diagram of the two-dimensional case, since the three-dimensional case may be very hard to make a good diagram out of. –  Tanner Swett Mar 23 '12 at 16:21
@Tanner L. Swett: ok, lets say my blue line is fully overlap and red is not. if i get the mid point of red and blue lines and then project it on to the black line, i guess i can solve this.Is it? i would like to stick to something like projection instead rectangle as i have the projection functions... any solution now plz. –  niro Mar 25 '12 at 23:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.