Discuss Scratch

italvera
New to Scratch
99 posts

Point in hypotenuse direction

Is there any way you can setup a script to find the direction to make a right triangle? (Like if I made a length of 10 and a height of 7 it would find a direction to match that and make a perfect right triangle)
Here's the project if you need it
Malicondi
Scratcher
1000+ posts

Point in hypotenuse direction

This will just require using some trigonometry, if you're trying to point in direction of the hypotenuse, you can use this block:
point in direction ([atan v] of ((x) / (y)))
which finds the direction of the hypotenuse, (x is the adjacent, or the side on the floor, y is the opposite, or the side going up, in your case it would be b / a) if this isn't what you're looking for could you describe what you're trying to do a little more?

Last edited by Malicondi (March 23, 2024 23:22:29)


post #1000 post #100 i help in the forums post #1 post #500 0 second ninja
I recommend reading jvvg's essay about the scratch team before complaining, as it may change your opinion and provide insight on the topic.

coming soon :)


italvera
New to Scratch
99 posts

Point in hypotenuse direction

Malicondi wrote:

This will just require using some trigonometry, if you're trying to point in direction of the hypotenuse, you can use this block:
point in direction ([atan v] of ((x) / (y)))
which finds the direction of the hypotenuse, (x is the adjacent, or the side on the floor, y is the opposite, or the side going up, in your case it would be b / a) if this isn't what you're looking for could you describe what you're trying to do a little more?
I tried this, but it didn't work. In the meantime, I will unshare the project until I can find a solution.

Powered by DjangoBB