Skip to main content

curvature

function curvature(ps: number[][]): (t: number) => number
function curvature(ps: number[][], t: number): number

Defined in local-properties-at-t/curvature/curvature.ts:23

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 with Number.isNaN
  • curried: if t is omitted a function of t is returned instead (the power basis conversion is then only done once which is much faster if the curvature is to be evaluated at many t values for the same curve)
Note!
Green circles are draggable!
0

Parameters:​

NameTypeDescription
psnumber[][]an order 1,2 or 3 bezier curve, e.g. [[0,0],[1,1],[2,1],[2,0]]
t?numberthe parameter value where the curvature should be evaluated (may be omitted, see above)

function κ(ps: number[][]): (t: number) => number
function κ(ps: number[][], t: number): number

Defined in local-properties-at-t/curvature/curvature.ts:46

Alias for curvature.

Returns the curvature κ of the given linear, quadratic or cubic bezier curve at a specific given parameter value t.

Parameters:​

NameTypeDescription
psnumber[][]an order 1, 2 or 3 bezier curve, e.g. [[0,0],[1,1],[2,1],[2,0]]
t?numberthe parameter value where the curvature should be evaluated

function radiusOfCurvature(ps: number[][]): (t: number) => number
function radiusOfCurvature(ps: number[][], t: number): number

Defined in local-properties-at-t/curvature/curvature.ts:60

Returns the radius of curvature of the given linear, quadratic or cubic bezier curve at a specific given parameter value t.

  • curried: if t is omitted a function of t is returned instead (see curvature)

Parameters:​

NameTypeDescription
psnumber[][]an order 1,2 or 3 bezier curve, e.g. [[0,0],[1,1],[2,1],[2,0]]
t?numberthe parameter value where the radius of curvature should be evaluated (may be omitted, see above)

function curvatureND(ps: number[][]): (t: number) => [number,number]
function curvatureND(ps: number[][], t: number): [number,number]

Defined in local-properties-at-t/curvature/curvature.ts:81

Returns the numerator and denominator of curvature [N,D], i.e. κ = N/D of the given linear, quadratic or cubic bezier curve at a specific given parameter value t.

  • curried: if t is omitted a function of t is returned instead (see curvature)

Parameters:​

NameTypeDescription
psnumber[][]an order 1,2 or 3 bezier curve, e.g. [[0,0],[1,1],[2,1],[2,0]]
t?numberthe parameter value (may be omitted, see above)