First off, I just want to say that I am not well versed in computational geometry, so if this question has some obvious answer, I apologize. I tried googling it but I could not find anything.
My question: Given an input of a plane with 1 or more line segments, is there an efficient algorithm for determining if there exists a closed region on this plane? For example, see the following picture:
On this plane, there exists one closed region. I would like the algorithm to return true if a closed region exists, and false if one does not.
At the moment, I only need this algorithm to determine if a closed region exists or not, but I could foresee needing this to return the number of closed regions as well.
Thanks for your help.