Same Side Technique A common way to check if a point is in a triangle is to find the vectors connecting the point to each of the triangle's three vertices and sum the angles between those vectors. If the sum of the angles is 2*pi then the point is inside the triangle, otherwise it is not. It works, but it is very slow. This text explains a faster and much easier method. First off, forgive the nasty coloring. I'm really sorry about it. Honest. Okay, A B C forms a triangle and all the points inside it are yellow. Lines AB, BC,
Read full article from Point in triangle test
No comments:
Post a Comment