An interactive polygon editor, which tests the concavity analysis introduced in this example.
Drag the vertices to modify the polygon. Try to make the polygon concave, then convex again. Also, try to reverse the vertices' ordering to see the polygon change to counterclockwise (blue) to clockwise (orange).
Please keep in mind that results are unspecified for complex (e.g self-intersecting) polygons and for coincident or colinear vertices.
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js