File: module-NURBSUtils.md | Updated: 11/15/2025
NURBSUtils is an addon, and must be imported explicitly, see Installation#Addons.
import * as NURBSUtils from 'three/addons/curves/NURBSUtils.js';
Calculates derivatives of a B-Spline. See The NURBS Book, page 93, algorithm A3.2.
p | The degree.
---|---
U | The knot vector.
P | The control points
u | The parametric point.
nd | The number of derivatives.
Returns: An array[d+1] with derivatives.
Calculates B-Spline curve points. See The NURBS Book, page 82, algorithm A3.1.
p | The degree of the B-Spline.
---|---
U | The knot vector.
P | The control points
u | The parametric point.
Returns: The point for given u.
Calculates basis functions derivatives. See The NURBS Book, page 72, algorithm A2.3.
span | The span in which u lies.
---|---
u | The parametric point.
p | The degree.
n | number of derivatives to calculate
U | The knot vector.
Returns: An array[n+1][p+1] with basis functions derivatives.
Calculates basis functions. See The NURBS Book, page 70, algorithm A2.2.
span | The span in which u lies.
---|---
u | The parametric value.
p | The degree.
U | The knot vector.
Returns: Array[p+1] with basis functions values.
Calculates "K over I".
k | The K value.
---|---
i | The I value.
Returns: k!/(i!(k-i)!)
Calculates NURBS curve derivatives. See The NURBS Book, page 127, algorithm A4.2.
p | The degree.
---|---
U | The knot vector.
P | The control points in homogeneous space.
u | The parametric point.
nd | The number of derivatives.
Returns: array with derivatives for rational curve.
Calculates derivatives (0-nd) of rational curve. See The NURBS Book, page 127, algorithm A4.2.
Pders | Array with derivatives.
---|---
Returns: An array with derivatives for rational curve.
Calculates a rational B-Spline surface point. See The NURBS Book, page 134, algorithm A4.3.
p | The first degree of B-Spline surface.
---|---
q | The second degree of B-Spline surface.
U | The first knot vector.
V | The second knot vector.
P | The control points in homogeneous space.
u | The first parametric point.
v | The second parametric point.
target | The target vector.
Calculates a rational B-Spline volume point. See The NURBS Book, page 134, algorithm A4.3.
p | The first degree of B-Spline surface.
---|---
q | The second degree of B-Spline surface.
r | The third degree of B-Spline surface.
U | The first knot vector.
V | The second knot vector.
W | The third knot vector.
P | The control points in homogeneous space.
u | The first parametric point.
v | The second parametric point.
w | The third parametric point.
target | The target vector.
Finds knot vector span.
p | The degree.
---|---
u | The parametric value.
U | The knot vector.
Returns: The span.