I have a collection of vertices that have been drawn sequentially by a user and I need to count how many enclosed areas there are within this shape. I have managed to find the intersecting points of crossing segments so I was thinking of walking along the path the initial shape was drawn since I have the direction each edge was drawn but, I'm unsure how to create a collection of polygons found within the shape.
Any help would be greatly appreciated!