Synopsis

PDX_MSGT mth_LoopInnerOuter(long option, int dim, long num_pnts1, double *loop_pnts1, long num_pnts2, double *loop_pnts2, int *relation)

Purpose

Check for the relation of two non-intersecting loops

Description

The relation of two loops is checked with the following assumptions: 1) two loops are closed, i.e. two ending points are connected if they are different; 2) two loops are continous; 3) two loops do not intersect each other.

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)

num_pnts1

The number of points of the first loop

loop_pnts1

The points array of the first loop

num_pnts2

The number of points of the second loop

loop_pnts2

The points array of the second loop

Output

relation

The relation of two loops: @d -1 : the first is inner and the second outer @d 1 : the first is outer and the second inner @d 2 : two loops are disjoin

Return

      MTH_NOERR
      Low level error return
      .fi