
Algebra PreAlgebra and Basic Algebra Math Forum 
 LinkBack  Thread Tools  Display Modes 
February 6th, 2011, 03:54 AM  #1 
Newbie Joined: Feb 2011 Posts: 1 Thanks: 0  Line segmentsdistance
How can I calculate the shortest distance between two line segments? if they are skew? line1:A[x1,y1,z1],B[x2,y2,z2] line2:C[x1,y1,z1],D[x2,y2,z2] 
February 6th, 2011, 08:23 AM  #2 
Senior Member Joined: Nov 2010 Posts: 502 Thanks: 0  Re: Line segmentsdistance
A key thing to note is that this segment will be perpendicular to both.

February 6th, 2011, 10:56 AM  #3  
Senior Member Joined: Feb 2009 From: Adelaide, Australia Posts: 1,519 Thanks: 3  Re: Line segmentsdistance
This is a difficult task, best left to a math library, and I'll direct you to this algorithm. Quote:
 
February 6th, 2011, 01:24 PM  #4  
Senior Member Joined: Nov 2010 Posts: 502 Thanks: 0  Re: Line segmentsdistance Quote:
 
February 6th, 2011, 01:25 PM  #5 
Senior Member Joined: Nov 2010 Posts: 502 Thanks: 0  Re: Line segmentsdistance
In addition, I direct you to the following links  which give simple ways to accomplish this (different than the one I proposed, however, but confirming the mutual perpendicular). http://www.coventry.ac.uk/ec//jtm/slides/8/sld8p5.pdf http://members.tripod.com/Paul_Kirby/vector/Vclose.html 
February 6th, 2011, 01:33 PM  #6 
Global Moderator Joined: May 2007 Posts: 6,306 Thanks: 525  Re: Line segmentsdistance
Point P(s) on line 1, P(s)= A + (BA)s Point Q(t) on line 2, Q(t)= C + (DC)t Let f(s,t) = P(s)Q(t)^2 Compute ?f/?s and ?f/?t and set them both = 0. Solve the simultaneous equations for s and t. (Notation: cap. letters for vectors, lower vase for scalars.) 
February 6th, 2011, 02:56 PM  #7  
Senior Member Joined: Feb 2009 From: Adelaide, Australia Posts: 1,519 Thanks: 3  Re: Line segmentsdistance Quote:
 
February 8th, 2011, 08:09 PM  #8  
Senior Member Joined: Nov 2010 Posts: 502 Thanks: 0  Re: Line segmentsdistance Quote:
 

Tags 
line, segmentsdistance 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
divide ellipse into line segments with required accura  nilesh33  Algebra  0  February 20th, 2013 10:17 AM 
Making a Circle out of line segments  Jmlee19  Calculus  5  December 6th, 2012 02:23 PM 
Geometry piecewise line segments  master555  Applied Math  0  December 2nd, 2011 05:56 PM 
Find the center of overlap between two line segments  1101  Algebra  4  February 22nd, 2011 11:43 AM 
Overlap of line segments  Cheesy74  Algebra  4  November 17th, 2009 05:23 AM 