BSpline1dNd Class
Knots and poles for a B-spline function mapping R to R^n.
- The "pole" (aka control point) of this class is a block of
poleLength
numbers. - Derived classes (not this class) assign meaning such as x,y,z,w.
- For instance, an instance of this class with
poleLength===3
does not know if its poles are x,y,z or weighted 2D x,y,w.
Methods
Name | Description | |
---|---|---|
constructor(numPoles: number, poleLength: number, order: number, knots: KnotVector): BSpline1dNd Protected | Initialize arrays for given spline dimensions. | |
addKnot(knot: number, totalMultiplicity: number): boolean | Insert the knot and resulting pole into the instance, optionally multiple times. | |
evaluateBasisFunctionsInSpan(spanIndex: number, spanFraction: number, f: Float64Array, df?: Float64Array, ddf?: Float64Array): boolean | Evaluate the order basis functions (and optionally one or two derivatives) at a given fractional position within |
|
evaluateBuffersAtKnot(u: number, numDerivative: number0): void | Evaluate the B-spline function and optional derivatives at the given parameter in knot space. | |
evaluateBuffersInSpan(spanIndex: number, spanFraction: number): void | * Evaluate the basis functions at spanIndex and fraction. | |
evaluateBuffersInSpan1(spanIndex: number, spanFraction: number): void | * Evaluate the basis functions and one derivative at spanIndex and fraction. | |
getPoint3dPole(i: number, result?: Point3d): undefined | Point3d | Copy 3 values of pole i into a point. |
|
reverseInPlace(): void | Reverse the instance poles and knots in place. | |
spanFractionToKnot(spanIndex: number, spanFraction: number): number | Map a span index and span fraction to knot value. | |
sumPoleBuffer1ForSpan(spanIndex: number): void | Compute the linear combination of the given span's poles and the weights in basisBuffer1 , and store this |
|
sumPoleBuffer2ForSpan(spanIndex: number): void | Compute the linear combination of the given span's poles and the weights in basisBuffer2 , and store this |
|
sumPoleBufferForSpan(spanIndex: number): void | Compute the linear combination of the given span's poles and the weights in basisBuffer , and store this point |
|
testClosablePolygon(mode?: BSplineWrapMode): boolean | Test if the leading and trailing poles are replicated in the manner of a "closed" B-spline function with wraparound | |
testCloseablePolygon(mode?: BSplineWrapMode): boolean | Test if the leading and trailing polygon coordinates are replicated in the manner of a "closed" bspline polygon | Deprecated |
create(numPoles: number, poleLength: number, order: number, knots: KnotVector): BSpline1dNd Static | Create a BSpline1dNd . |
Properties
Name | Type | Description | |
---|---|---|---|
basisBuffer | Float64Array | Values of the order relevant B-spline basis functions at a parameter. |
|
basisBuffer1 | Float64Array | Derivatives of the order relevant B-spline basis functions at a parameter. |
|
basisBuffer2 | Float64Array | Second derivatives of the order relevant B-spline basis functions at a parameter. |
|
degree Accessor ReadOnly | number | (property accessor) Return the degree of the polynomials. | |
knots | KnotVector | Knots of the bspline. | |
numPoles Accessor ReadOnly | number | (property accessor) Return the number of poles. | |
numSpan Accessor ReadOnly | number | (property accessor) Return the number of bezier spans (including null spans at multiple knots). | |
order Accessor ReadOnly | number | (property accessor) Return the order (one more than degree) of the polynomials. | |
packedData | Float64Array | Poles packed in blocks of poleLength doubles. |
|
poleBuffer | Float64Array | Temporary to hold a single point. | |
poleBuffer1 | Float64Array | Temporary to hold a single derivative vector. | |
poleBuffer2 | Float64Array | Temporary to hold a single second derivative vector. | |
poleLength | number | The number of numeric values per pole. |
Defined in
- bspline/BSpline1dNd.ts Line 21
Last Updated: 21 February, 2025
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.