It looks like there is an error in the second example data in the lower textarea in the page. The coordinates for the last point should be [9, 8], not [9, 9]. (It appears correctly on the figure.)