Given 3 integral coordinates of vertices of Triangle ABC and another integral coordinate P, how do I check if P strictly lies inside the triangle or not ?
I know how to check if P is inside triangle or not using Area method i.e, Area ABC = Area ABP + Area ACP + Area BCP.
But In this question, I want to P to be strictly inside the triangle.
There is lot approaches to check whether point lies inside triangle. The simplest ones, I think:
1) Check whether point is on the same side of all edges (find signs of cross products for edge vectors and vertex-point vectors
AB x AP, BC x BP, CA x CP
)2) Represent AP vector in basis of AB and AC vectors - coefficients and their sum should be in range 0..1. Delphi code: