Skip to main content

split-by-deviation-from-straigh-line-quad

function splitByDeviationFromStraighLine_Quad(ps: number[][], maxD: number): number[]

Defined in transformation/split/split-by-deviation-from-straigh-line-quad.ts:18

Split the given quadratic bezier curve into pieces (given as an array of parameter t values) such that each piece is guaranteed to deviate less than maxD from a straigh line.

Parameters:

NameTypeDescription
psnumber[][]an order 2 bezier curve given as an ordered array of its control point coordinates, e.g. [[0,0], [1,1], [2,1]]
maxDnumber