In reply to Ksharp.

This article is about barycentric coordinates, which happen to solve the point-in-polygon problem for a triangle. To classify whether a point is inside an arbitrary polygon, I suggest downloading and using the 'polygon' package in SAS IML. The package includes the PolyPtInside function, which uses the winding number of a polygon to solve the problem. For details, see Wicklin (2016). There is an example on p. 3.