Returns True if pt lies inside the polygon described by the point list poly.
Polygons are represented in a "lightweight" way by a list of points . The first three non-colinear points define the "plane" of the polygon, and even if the rest of the points do not lie in that plane, they will be projected onto that plane for all computations.
pointInPolygon? ( pt As Point, _ poly As List ) As Boolean
Argument | Type | Description |
---|---|---|
pt | Point | The point to be tested. |
poly | List | The point list defining the polygon. |
Intent >pointInPolygon?(point(1,1,0), {Point(0,0,0), Point(2,0,0), Point(1,2,0)}) --> True
Intent >pointInPolygon?(point(2,1,0), {Point(0,0,0), Point(2,0,0), Point(1,2,0)}) --> False
Intent >pointInPolygon?(point(1,0,0), {Point(0,0,0), Point(2,0,0), Point(1,2,0)}) --> True