ScratchData LogoScratchData
Back to chooper-beta's profile

2-Size Pen Lines - O(log n) filler

CHchooper-beta•Created October 24, 2016
2-Size Pen Lines - O(log n) filler
202
144
2065 views
View on Scratch

Instructions

Click anywhere to show how the double sized line is constructed. Press space to see a comparison between how the new and old algorithms work.

Description

@WO997 brought it to my attention that the previous 2-size pen line filler was horribly inefficient when it came to lines with large differences Therefore, I decided to update the algorithm to use a new, much more efficient O(log n) algorithm - you can see in the project how many less lines it draws This algorithm also has greater precision - previously sizes were rounded to the nearest 2 and then the size of the line went up in steps of 2. Now, the line size is not rounded anywhere Anyway, this will be used in the next update to the 3D engine :D

Project Details

Project ID127249376
CreatedOctober 24, 2016
Last ModifiedFebruary 26, 2017
SharedOctober 24, 2016
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root