Delete repeated points manually from the DOM element. Now resize or move the polygon, you'll notice that duplicate points re-appear.
In case of 3 points (triangle) polygon, total points are 5.
In case of 4 points polygon, total points are 7.
In case of 5 points polygon, total points are 8.
starting point: v2.html link: https://naturalintelligence.github.io/imglab/v2.html
Steps:
In case of 3 points (triangle) polygon, total points are 5. In case of 4 points polygon, total points are 7. In case of 5 points polygon, total points are 8.