Demo: https://demo.kelvinau.net/Random-Irregular-Polygon/animation.html
JS Library for Generating Random Irregular Polygon
const generator = new RIP({
numOfPoints: 10, // number of points
minCoordVal: 20, // minimum coordinate value
maxCoordVal: 100, // maximum coordinate value
});
const coords = generator.getPolygonCoord();
The algorithm is based on the paper Heuristics for the Generation of Random Polygons by Thomas Auer & Martin Held.