this is my take on filling a triangle in scratch efficiently(?), feel free to play around with it to see how it works you can also drag the corners (its quite satisfying ^^)
if anyone knows(or has a vague idea of) a better way to do this, please let me know my goal is to completely fill any triangle with as few lines as possible (while avoiding "complex" functions like sqrt, sin etc.) i hope to use this code for 3d rendering later