ScratchData LogoScratchData
Back to TheLogFather's profile

Triangle gradient fill

THTheLogFather•Created July 21, 2014
Triangle gradient fill
34
21
798 views
View on Scratch

Description

A remix of the fast triangle filler, but now includes a colour gradient fill from one RGB triplet at the outer edge to another at the middle. The inner RGB triplet is sent as a change for each RGB component, relative to the outer RGB triplet (to help reduce some calculations during the fill). The previous single colour fill increased the pen size for each layer as quickly as possible, in order to fill using as few layers as possible. Here, though, it needs to do more layers to make the gradients look reasonably smooth - roughly twice as many layers, hence making it roughly twice as expensive as the single colour fill. Also, the previous fast fill worked outwards, from the in-circle centre to the outer edge. Also, each layer always touched the outer edges of the triangle. Here, though, the fill works from the outer edges inwards, and we want the layers to no longer touch the outer edges as they proceed inwards. This requires a but of extra 'playing around' with values to try to avoid leaving gaps between the layers. As usual, it's a compromise between speed and looks...

Project Details

Project ID24900787
CreatedJuly 21, 2014
Last ModifiedMay 11, 2015
SharedJuly 21, 2014
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root