Synopsis

PDX_MSGT mth_Intersect2DLines(long option, double para_tol, double *pt1, double *tan1, double *pt2, double *tan2, double *alf1, double *alf2, double *intpt)

Purpose

Intersect two parametric lines in the xy-plane.

Description

This routine intersects two parametric straight lines lying in the xy-plane. The lines must be in point/vector form.

Input

option

MTH_ALPHAS

Just compute alf1 and alf2 (see below).

MTH_POINT

Just compute the intersection point.

para_tol

The parallel lines test tolerances.

pt1

The initial point on the first line (array with two elements).

tan1

The tangent vector of the first line.

pt2

The initial point on the second line.

tan2

The tangent vector of the second line.

Output

alf1

Parametric distance of intersection point from pt1 along tan1 ( option must be set to MTH_ALPHAS).

alf2

Parametric distance of intersection point from pt2 along tan2 ( option must be set to MTH_ALPHAS ).

intpt

The intersection point (array with x,y-coordinates). ( option must be set to MTH_POINT ).

Return

      MTH_NOERR
      MTH_PARALLELLINES
      .fi