Vector2D current = loop[loop.length - 1];
for (int i = 0; i < loop.length; ++i) {
final Vector2D previous = current;
current = loop[i];
final Line line = new Line(previous, current);
final IntervalsSet region =
new IntervalsSet(line.toSubSpace(previous).getX(), line.toSubSpace(current).getX());
edges.add(new SubLine(line, region));
}
polygon = new PolygonsSet(edges);
// ensure the polygon encloses a finite region of the plane