nurbsSurface.controlPoint

The Euclidean position of control point (i, j): row i along u, column j along v.

Value helperSince 0.4.0

Usage

TypeScript
surface.controlPoint(i: number, j: number): Point3

Parameters

  • inumber

    Row, 0 … rows − 1 (along u).

    Required

  • jnumber

    Column, 0 … cols − 1 (along v).

    Required

Returns

The point; its coordinates are undefined or wrong when i or j is out of range (no bounds check: an overlong j reads the next row).

Example

TypeScript
const s = NurbsSurface.create([[Point3.of(0, 0, 0), Point3.of(0, 2, 0)], [Point3.of(3, 0, 0), Point3.of(3, 2, 0)]], 1, 1).value
s.controlPoint(1, 0) // → { x: 3, y: 0, z: 0 }

See also