The red outline and black vertices shows the input polygon, and the blue outline and white vertices show the output triangles. Also the purple outline and green vertices shows the output polygon (before it is sliced up into triangles)
Combined with my small and fast triangle render engine, this engine finds the smallest ammount of triangles that fit into any polyogn, and then renders them out using my fast triangle engine. As a bonus I also added canvas border clipping (using the liang barsky line clipping algorithm). This engine runs ridiculously fast for what it can do, and I will be using it in my current fast 3D project (as a replacement for the previous, much slower version).