Determine if a point belongs to a polygon.
[b,x1,y1,x2,y2] = NL_F_PointOfPolygon(P,x,y,d)
Polygon.
x-coordinate of the point.
y-coordinate of the point.
Precision.
Boolean.
x-coordinate of the first point of the segment.
y-coordinate of the first point of the segment.
x-coordinate of the second point of the segment.
y-coordinate of the second point of the segment.
NL_F_PointOfPolygon determines if the point of coodinates (x,y) belongs to the polygon P=(P1x P1y P2x P2y ... Pnx Pny) defined by the list of its successive points' coordinates. The point N (x,y) is assumed to be part of a segment between the point N1 (x1,y1) and the point N2 (x2,y2) if the distance between (N1,N2) is egal to the sum of the distances between (N,N1) and (N,N2). As we get some issues due to calculation precision, we also consider the precision d ((N1,N2)=(N,N1)+(N,N2)+d). If the point belongs to the polygone, b=%T. Else b=%F and the parameters (x1,y1,x2,y2) are empty.