title: How do I find the intersection of two line segments?
body: <p>Suppose we have two finite line segments defined each by two points (in two space). I would like to find a way to get the intersection point of those two lines. Eventually, I would like to extend this to work on sets of connected line segments. </p>
  
  <p>I have found a good solution here: <a href="https://stackoverflow.com/questions/8094374/python-matplotlib-find-intersection-of-lineplots">Python - matplotlib: find intersection of lineplots</a>. However, this relies on scipy, which I believe requires BLAS, which for separate reasons I would like to avoid. </p>
  
  <p>matplotlib has a module called Path, which has an intersects_path() function (<a href="http://matplotlib.org/api/path_api.html#matplotlib.path.Path.intersects_path" rel="noreferrer">http://matplotlib.org/api/path_api.html#matplotlib.path.Path.intersects_path</a>) which returns true or false for the existence of an intersection, but not the specific location, which I require. </p>
  
  <p>Does anyone know of a clean approach to this?</p>
  
  <p>Any solution I am coming up with is lengthy, and if a solution already exists I would really prefer not to re-invent the wheel.</p>
  
  <p>Thanks!</p>