Polygon triangulation in O(n^2).