nurbsCurve.derivativeAt

The first derivative dC/dt at a knot parameter, with respect to knot units.

Value helperSince 0.4.0

Usage

TypeScript
curve.derivativeAt(t: number): Vector3

Parameters

  • tnumber

    Knot parameter, in the curve’s domain.

    Required

Returns

The derivative vector, in model units per knot unit; its length depends on the parameterisation, not only the shape. A parameter outside the domain is clamped to it, so pointAt(t) past an end returns the end point; NaN gives NaN coordinates.

Use instead

Example

TypeScript
const q = NurbsCurve.create([Point3.of(1, 0, 0), Point3.of(1, 1, 0), Point3.of(0, 1, 0)], 2, { weights: [1, Math.SQRT1_2, 1], knots: [0, 0, 0, 1, 1, 1] }).value
q.derivativeAt(0) // → { x: 0, y: 1.4142…, z: 0 }