nurbsCurve.controlPoint

The Euclidean position of control point i.

Value helperSince 0.4.0

Usage

TypeScript
curve.controlPoint(i: number): Point3

Parameters

  • inumber

    Control-point index, 0 … pointCount − 1.

    Required

Returns

The point; its coordinates are undefined when i is out of range (no bounds check).

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.controlPoint(1) // → { x: 1, y: 1, z: 0 }

See also