Function: plocus

Syntax

plocus (<point>,<points>,<tolerance>)

Returns

The indices of points in an array which are within a distance of another point.

Parameters

Examples

Declare an array of 16 points.

point pts[] = <(69,697),(353,819),(600,691),(522,338),\
   (253,425),(763,472),(794,125),(394,103),\
   (244,259),(522,434),(716,747),(578,822),\
   (300,741),(131,350),(113,197),(538,119)>

Find which of the points is within 200 of the point (400,400).

numeric nn[] = plocus((400,400),pts,200)
tell nn
tell pts[nn]

The above will display the following values.

4 5 10
(522,338,0) (253,425,0) (522,434,0)

See Also

Functions:

porder (numeric)