ScratchData LogoScratchData
Back to Pufferfish_Test's profile

Slope detector v3.5

PUPufferfish_Test•Created June 9, 2020
Slope detector v3.5
2
1
21 views
View on Scratch

Instructions

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. This is my most accurate and efficient slope detector to date. Use the arrow keys to rotate the line. This method uses a semicircle of 36 points to determine the angle. The true/false values of each of the 36 points touching the line are stored in a list and then the gradient is worked out from a list of all the angles of the points.

Description

All code by me. I had to learn trigonometry in one Saturday morning to do this. It wasn't too difficult. #slope #trig #trigonometric #trigonometry #gradient #maths #steepness #efficient

Project Details

Project ID403336079
CreatedJune 9, 2020
Last ModifiedJune 9, 2020
SharedJune 9, 2020
Visibilityvisible
CommentsAllowed