get-curvature-extrema
• interface Extrema
Defined in get-curvature-extrema/get-curvature-extrema.ts:13
Curve extrema
Name | Type | Description |
---|---|---|
minima | number[] | list of paramter t values where minima occur |
maxima | number[] | list of paramter t values where maxima occur |
inflections | number[] | 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!
Parameters:
Name | Type | Description |
---|---|---|
ps | number[][] | 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]] |