This detects the steepness of a slope - how far the y moves when the x changes by 1 - and the angle it makes with the x axis. It isn't particularly accurate - it rounds to the nearest 10 (most of the time). At the beginning please select the angle of the slope - where 90 is horizontal, 0 is vertical and -90 is horizontal again. It uses Scratch's strange coordinate system by the way. This method uses a semicircle of 18 points to determine the angle. The line just moves until it's touching the centre, then if it's touching a specific point it does all the calculations for that point.
All code by me. I had to leatn trigonometry in one Saturday morning to do this. It wasn't too difficult. #slope #trig #trigonometric #trigonometry #gradient #maths #steepness