nurbsCurve.derivativeAt
The first derivative dC/dt at a knot parameter, with respect to knot units.
Usage
curve.derivativeAt(t: number): Vector3Parameters
tnumberKnot parameter, in the curve’s domain.
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
nurbsCurve.tangentAt: only the direction matters
Example
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 }