inpoly (<point>,<points[ ]>)
numeric
The status of a point with regard to a polygon. Two values are returned:
1) proximity status: -1 (point is outside), 0 (point is on edge), 1 (point is inside),
2) distance from point to the nearest edge.
<point>
Point to test.
<points[ ]>
A point array
containing the vertices of the polygon.
The following returns the values 0 and 0.
point myps[] = <p0,e:100,n:100,w:100> numeric stat[2] = inpoly(p0,myps)
The following returns the values 1 and 50.
stat = inpoly((50,50,0),myps)
The following returns the values -1 and 50.
stat = inpoly((50,-50,0),myps)
Functions: |
inbox (numeric) |