I have a list of points that in pairs describe a polygon, for example:
<0,0> <0,1> <0,1> <1,0> <1,0> <1,1> <1,1> <0,0> which is a square. Note that each pair of points describes a line, so our square consists of lines
<<0,0> <0,1 l β &; <0.1> <1.0 L β &; <1.0> <1.1 L β &; <1.1> <0.0 β
However, I have to draw these polygons, which work fine when all the points are in order and there are no holes. Unfortunately, this sometimes happens incorrectly when input is similar to
<0,0> <0,1> <1,1> <0,0> <0,1> <1,0> <1,0> <1,1> and the resulting polygon is strange or when in
there are several holes
<0,0> <0,2> <0,2> <2,0> <2,0> <2,2> <2,2> <0,0 <1,1 <1,1,5 < 1,1,5 <1,5,1,5 <1,5,1,5 <1,1>
In these situations, the naive thing of drawing these polygons with drawpoly (dots) will not work.
This is in C #, and actually the input is List<GeoData> , where GeoData contains 2 points (and some other misq data). For the conclusion, I was thinking of creating a list and list>, where the first set of points is the outer line and the second list is the holes, will this work? I need to do a few extra calculations with polygons besides drawing, but I think that this will be easiest with a special list of holes.
Here is an example: 
On the left - what I am getting right now is the entrance.