When you draw 3 line segments in a 2-dimensional plane, it might compose a triangle.
How can I find all polygons that are produced by n line segments? Are there any efficient algorithms I can use?
Input: first and last point coordinate for each line segments (Ex. Points A=(x_A,y_A), B=(x_B,y_B), ... , I=(x_I,y_I))
Output: All produced polygons and producing line sets (Ex. {A,B,C,F},{A,C,E,F,H},{E,F,I},{E,F,I,H},{G,H,I})