Skip to main content

get-curvature-extrema

• interface Extrema

Defined in get-curvature-extrema/get-curvature-extrema.ts:13

Curve extrema

NameTypeDescription
minimanumber[]list of paramter t values where minima occur
maximanumber[]list of paramter t values where maxima occur
inflectionsnumber[]list of paramter t values where inflection points occur

function getCurvatureExtrema(ps: number[][]): Extrema

Defined in get-curvature-extrema/get-curvature-extrema.ts:38

Returns the parameter t values (in [0,1]) of local minimum / maximum absolute curvature for the given bezier curve. If there are an infinite number of such t values (such as is the case for a line), an empty array is returned.

  • see MvG's excellent answer on math.stackexchange
Note!
Green circles are draggable!
0

Parameters:

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