Skip to main content

get-endpoint-intersections

function getEndpointIntersections(psA: number[][], psB: number[][], orderAlreadyReduced: boolean): X[]

Defined in intersection/get-endpoint-intersections/get-endpoint-intersections.ts:36

Returns the intersection range (given as 2 intersections (Xs)) where the endpoints of the two given algebraically identical curves overlap (provided they overlap, else an empty array is returned).

  • precondition: the two given curves must be algebraically identical (i.e. identical except possibly for endpoints)

  • precondition: not all bezier control points collinear

Parameters:​

NameTypeDefault valueDescription
psAnumber[][]-an order 1,2 or 3 bezier curve
psBnumber[][]-another bezier curve
orderAlreadyReducedbooleanfalseoptional; defaults to false; set to true if the order of both curves has already been reduced as far as possible (e.g. via reduceOrderIfPossible) to avoid doing it again