nurbsCurve.pointAt

The point on the curve at a knot parameter.

Value helperSince 0.4.0

Usage

TypeScript
curve.pointAt(t: number): Point3

Parameters

  • tnumber

    Knot parameter, in the curve’s domain.

    Required

Returns

The rational point C(t). A parameter outside the domain is clamped to it, so pointAt(t) past an end returns the end point; NaN gives NaN coordinates.

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.pointAt(0.5) // → { x: 0.7071…, y: 0.7071…, z: 0 }

See also