title: Is there an algorithm for determining if a set of points in 2D space forms a closed region?
body: <p>I have a set of points (x, y) that I would like to know if it forms a closed region (within a rectangular 2D raster). This seems like a simple problem, but after a half-hour of googling, I was unable to find an algorithm that addresses this issue. Is there a known algorithm for this problem?</p>
  
  <p>A routine written in C++ or C# (or even pseudo code) would be ideal.</p>
  
  <p>EDIT:
  The specific problem I am dealing with here is a drawing program where the application user is supposed to be drawing a boundary around a region of interest. I want to warn the user if the boundary that they've drawn does not form a closed region.</p>