# Synopsis

PDX_MSGT mth_PointInLoop(long option, int dim, double *pnt, long num_pnts, double *loop_pnts, double tol, int *relation)

# Purpose

Check the relation between a point and a loop

# Description

The relation of a point and a loop is checked with the following assumptions: 1) the loop is closed, i.e. two ending points are connected if they are different; 2) the loop is continous;

Though the actual data is in 2D space, for convenience, the input can be either 2D or 3D points. Certainly the third elements of the 3D points are not used.

# Input

## option

Options (not used)

## dim

The dimension of points (2 or 3)

## pnt

The point

## num_pnts

The number of points of the loop

## loop_pnts

The points array of the loop

## tol

The tolerance for determining if the point is on the loop or not

# Output

## relation

The relation of the point and the loop: @d -1 : the point is inside of the loop @d 0 : the point is on the loop @d 1 : the point is outside of the loop

# Return

          MTH_NOERR
          Low level error return
          .fi