ScratchData LogoScratchData
Back to gtoal's profile

Triangle Fill by inscribed circles (experimental)

GTgtoal•Created March 26, 2015
Triangle Fill by inscribed circles (experimental)
35
20
650 views
View on Scratch

Instructions

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.

Description

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

Project Details

Project ID54528538
CreatedMarch 26, 2015
Last ModifiedJanuary 13, 2019
SharedMarch 26, 2015
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root