title: How to find the polygon enclosing a point from a set of lines?
body: <p>I have a set of non-intersecting lines, some of which are connected at vertices. I'm trying to find the smallest polygon, if one exists, that encloses a given point. So, in the image below, out of the list of all the line segments, given the point in red, I want to get the blue ones only. I'm using Python, but could probably adapt an algorithm from other languages; I have no idea what this problem is called.</p>
  
  <p><img src="https://i.stack.imgur.com/EsQ0e.png" alt="Example"></p>