Skip to main content

FindPointsInPoly

FindPointsInPoly xWaveName, yWaveName, xPolyWaveName, yPolyWaveName

The FindPointsInPoly operation determines if points fall within a certain polygon. It can be used to write a procedure that operates on a subset of the data identified graphically in a graph.

Details

FindPointsInPoly determines which points in yWaveName vs xWaveName fall within the polygon defined by yPolyWaveName vs xPolyWaveName.

xWaveName must have the same number of points as yWaveName and xPolyWaveName must have the same number of points as yPolyWaveName.

FindPointsInPoly creates an output wave named W_inPoly with the same number of points as xWaveName. FindPointsInPoly indicates whether the point yWaveName[p] vs xWaveName[p] falls within the polygon by setting W_inPoly[p] to 1 if it is within the polygon, or to 0 if not.

FindPointsInPoly uses integer arithmetic with a precision of about 1 part in 1000. This should be good enough for visually determined (hand-drawn) polygons but might not be sufficient for mathematically generated polygons.

The FindPointsInPoly operation is not multidimensional aware. See Multidimensional Waves, particularly Analysis on Multidimensional Waves for details.

See Also

GraphWaveDraw, PolygonOp