curvature
function curvature(ps: number[][], t: number): number
Defined in local-properties-at-t/curvature.ts:17
Returns the curvature κ
of the given linear, quadratic or cubic bezier
curve at a specific given parameter value t
.
- returns
Number.NaN
at a cusp - this can be tested for withNumber.isNaN
Note!
Green circles are draggable!
Example
curvature([[1, 1], [7, 7], [4, 2], [8, 1.5]], 0.4)//=> -1.7991477717512248
Parameters:
Name | Type | Description |
---|---|---|
ps | number[][] | an order 1,2 or 3 bezier curve, e.g. [[0,0],[1,1],[2,1],[2,0]] |
t | number | the parameter value where the curvature should be evaluated |
const
κ: (ps: number[][], t: number): number
Defined in local-properties-at-t/curvature.ts:46
Alias for κ.
Returns the curvature κ
of the given linear, quadratic or cubic bezier
curve at a specific given parameter value t
.
- alias: curvature
Parameters:
Name | Type | Description |
---|---|---|
ps | number[][] | an order 1, 2 or 3 bezier curve, e.g. [[0,0],[1,1],[2,1],[2,0]] |
t | number | the parameter value where the curvature should be evaluated |