I've seen several triangle-drawing algorithms and thought I'd try my hand at one of the circle-filled variations. This one uses either a pen dot, or stamping of a circle, to fill the single inverted central triangle (the Gergonne triangle) formed by the touch points of the inscribed circle with each side, then recursion to fill in the three remaining similar triangles. The pen runs much faster than stamping but is still too slow at any recursion level above 3.
I took therealergo's project as a starting point, since he already had code to locate the inscribed circle in any triangle. PLEASE NOTE that this algorithm doesn't work for most triangles (which you'll see if you move a vertex) however it's a good testbed for experiments... What I need to do next is calculate the points on each side where the inscribed circle touches, and recurse using those sub-triangles instead of the central point. (It was a quick hack for equilateral triangles, written after reading https://scratch.mit.edu/discuss/topic/101296/ ) to do: http://jwilson.coe.uga.edu/emt725/Bisect/bisect.html https://answers.yahoo.com/question/index;_ylt=A0LEV7pugxRVT18ASn4nnIlQ?qid=20101231083318AAINgq3