-----------------------------Edge Function--------------------------- USE TURPOWARP! https://turbowarp.org/1320984057 In computer graphics the edge function basicly tells us a point is on which side of a line defined by two points. If the value is 0 it's on the line, if its greater then 0 it's on this side and if it's less then 0 then it's on the other side. By computing the edge function of a point to the 3 sides of a triangle we can find every pixel that's inside the triangle (e.g.: for a counter clockwise triangle like this if the value is 0 or greater then 0 it gets colored). It's used in 3D graphics to draw the 3d triangles onto the screen by projecting it onto the screen and then calculating every pixel's edge function to every triangle. But then why not use it in scratch? The problem is that it requires the use of your computer's graphics card to run the calculations and color the pixels, which unfortunetly can't be accessed by scratch so it's really slow, since it's rendering with the processor. Because of that I limited the minimum resolution to 20 on scratch, use turbowarp to go lower. Of course it could be more optimized, first of all instead of a rectangle filler, it uses two triangle fillers, second pixels that are not colored are also drawn, it's just white. The color of each pixel inside the triangle is determined by it's normalised edge value. You can drag the points of the triangle. Feel free to use it, just credit me :)