GEOintersectStraightCircle

Top  Previous  Next

Cut of a straight line with a circle.

The arc is determined by the centre and radius. Delivers the intersections, if necessary the factors of (P2-P1) to the achievement of the intersections. All back values which are not needed may receive zero pointer.

Parametre

x1 (stands in) [IN]

Co-ordinate on the x axis of the first point of the straight lines.

y1 (stands in) [IN]

Co-ordinate on the Y axis of the first point of the straight lines.

x2 (stands in) [IN]

Co-ordinate on the x axis of the second point of the straight lines.

y2 (stands in) [IN]

Co-ordinate on the Y axis of the second point of the straight lines.

xm (stands in) [IN]

Co-ordinate on the x axis of the centre of a circle.

ym (stands in) [IN]

Co-ordinate on the x axis of the centre of a circle.

r (stands in) [IN]

Radius

xs1 (stands in *) [IN / OUT]

Co-ordinate on the x axis of the first intersection, if available.

ys1 (stands in *) [IN / OUT]

Co-ordinate on the Y axis of the first intersection, if available.

xs2 (stands in *) [IN / OUT]

Co-ordinate on the x axis of the first intersection, if available.

ys2 (stands in *) [IN / OUT]

Co-ordinate on the Y axis of the first intersection, if available.

s12 (stands in *) [IN / OUT]

s12 is the factor with which is determined whether the first intersection still lies on the straight lines. Is valid 0≤s12≤1, so the intersection is still on the straight lines.

s34 (stands in *) [IN / OUT]

s34 is the factor with which is determined whether the second intersection still lies on the straight lines. Is valid 0≤s34≤1, so the intersection is still on the straight lines.

Result

(int) [OUT]

The return value gives the number of the intersections:

3 no intersections,

4 an intersection

5 two intersections

Declaration

#include "basic.h"

 

int DLLENTRY GEOintersectStraightCircle (

stand in x1,

stand in y1,

stand in x2,

stand in y2,

stand in xm,

stand in ym,

stand in r,

stand in * xs1,

stand in * ys1,

stand in * xs2,

stand in * ys2,

stand in * s12,

stand in * s34

);

Related functions

GEOintersectArcArc

GEOintersectCircleArc

GEOintersectCircleCircle

GEOintersectCircleLine

GEOintersectLineArc

GEOintersectLineLine

GEOintersectLineLine2

GEOintersectLineSpline

GEOintersectStraightArc

GEOintersectStraightLine

GEOintersectStraightStraight

GEOintersectStraightVector

GEOintersectVectorVector