ScratchData LogoScratchData
Back to TheLogFather's profile

Faster hybrid triangle fill (NOT for Scratch3)

THTheLogFather•Created April 3, 2015
Faster hybrid triangle fill (NOT for Scratch3)
79
63
3964 views
View on Scratch

Description

>>>> WARNING: this was written for Scratch 2 and gives very incorrect values on Scratch 3. It also used some 'quirks' of Scratch 2 to increase speed, and these are no longer sensible for Scratch 3 - so it really needs rewriting from... ummm... scratch. :p Basically, don't trust the numbers nowadays... :( ====================================== UPDATE; squeezed a little more out of it using a trick... See https://scratch.mit.edu/discuss/post/908898/ :) ------ This new method puts more work into script execution in order to draw shorter lines that overlap much less of those parts of the triangle that have already been filled. This means it ends up just filling the remaining corners with thinner and thinner lines. This leads to a significantly reduced render time once the triangle reaches a large enough size - hence the need for a hybrid method to keep the advantage of the original fill method for the smaller tris. Tris drawn with the new method have black outline, so you can tell.

Project Details

Project ID55619918
CreatedApril 3, 2015
Last ModifiedFebruary 12, 2022
SharedApril 3, 2015
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root