This basically clips all the triangles inside a convex polygon. Drag the purple dots to move the vertices of the clipping polygon. This only works if the points of the clipping polygon are in clockwise order and if the clipping polygon is convex.
I found out how to do the algorithm by googling it. @kryptoscratcher for the tri filler, the rest of the code is by me This is probably really unoptimized I needed to make this for something I’m working on