Check if a point is inside of a triangle

how can I check if a point is inside of a triangle? Is there a mathematical formula for it?
And what about any N sided shape?

And assuming this is true:

Thank you!

1 Like

does this work with any shape? It should right?

I didn’t test it, sorry. :confounded:

1 Like

It should. the only problem now is to sort the points to form a ring.