多角形を三角形に分割するやつです クリックで頂点を追加 自己交差するとバグる
[ Triangulation by Ear Clipping ] https://www.geometrictools.com/Documentation/TriangulationByEarClipping.pdf