GEOintersect2LinesAngle

Top  Previous  Next

Calculation of the intersection of two lines.

With this function the intersection of the two lines which are given by a point and her gradient corner in the curve measure is calculated.

Parametre

STAND-IN x1, y1, alpha1 IN

Sharp and gradient of the first line

STAND-IN x2, y2, alpha2 IN

Sharp and gradient of the second line

STAND-IN *xs, *ys OUT

Calculated intersection of both lines.

Result

int OUT

0 OK: SEEchnittpunkt of both lines calculates

-1 mistakes: no intersection calculates, because lines in parallel

Declaration

#include "basic.h“

 

int DLLENTRY GEOintersect2LinesAngle (

stand in x1,

stand in y1,

stand in alpha1,

stand in x2,

stand in y2,

stand in alpha2,

stand in *xs,

stand in *ys

);

Example

status = GEOintersect2LinesAngle (10.0, 10.0, 0.5236, 30.0, 5.0,-0.7854, &xs, &ys)

The variable status receives the value 0, i.e. the lines cut themselves in the point xs=20, ys=15.

status = GEOintersect2LinesAngle (10.0, 10.0, 0.7854, 30.0, 5.0,-2.3562, &xs, &ys)

The variable status receives the value-1, i.e. the lines do not cut themselves there them are parallel.