Discuss Scratch

NeonG4
Scratcher
1000+ posts

Point inside triangle

Hello! Let's say I have a point, P.
I also have a triangle with vertices A, B, and C.
How would I calculate if the point (P) lies inside the triangle?

Last edited by NeonG4 (June 20, 2023 21:39:45)

PhiPhenomenon
Scratcher
500+ posts

Point inside triangle



Using these principles, I made this code:

The output is the isInside boolean.
NeonG4
Scratcher
1000+ posts

Point inside triangle

PhiPhenomenon wrote:

snip
Oh, thats smart! Thank you!

Powered by DjangoBB