
This is a demo of a triangle fill algorithm I came up with. ( i ) Hover over the vertices and grab them to move them. ( ii ) 'level of accuracy' controls the number of iterations (see notes)
I decided to implement the algorithm after seeing the amazing InterXeptor 3D by MrLog. The algorithm first draws a dot, then iteratively 'fleshes out' the triangle by drawing more triangles around the existing filled area, precisely so that no gaps are created, and the maximum area is filled per iteration*. This technique requires a lot of maths, so it may or may not be quicker than a simpler 'brute force' method like a 'fan' of lines. The algorithm is at least similar to MrLog's, but I don't yet know the details of his. * not counting the incircle as an iteration. The incircle is the largest circle that can be drawn inside the triangle.