createGrid MethodStatic

Create a bspline surface with given knots.

  • This create variant takes control points in a "grid" array, with the points from each grid row [rowIndex] being an independent array points[rowIndex][indexAlongRow][x,y,z,w]
  • knotArrayU and knotArrayV are optional -- uniform knots are implied if they are omitted (undefined).
  • When knots are given, two count conditions are recognized in each direction:
    • If poleArray.length + order == knotArray.length, the first and last are assumed to be the extraneous knots of classic clamping.
    • If poleArray.length + order == knotArray.length + 2, the knots are in modern form that does not have the classic unused first and last knot.

createGrid(xyzwGrid: number[][][], weightStyle: WeightStyle, orderU: number, knotArrayU: Float64Array | number[], orderV: number, knotArrayV: Float64Array | number[]): undefined | BSplineSurface3dH

Parameter Type Description
xyzwGrid number[][][] Array of points, ordered along the U direction.
weightStyle WeightStyle how the points are weighted
orderU number order for the U direction polynomial (order is one more than the degree. "cubic" polynomial is order 4.)
knotArrayU Float64Array | number[] knots for the V direction. See note above about knot counts.
orderV number order for the V direction polynomial (order is one more than the degree. "cubic" polynomial is order 4.)
knotArrayV Float64Array | number[] knots for the V direction. See note above about knot counts.

Returns - undefined | BSplineSurface3dH

Defined in

Last Updated: 17 December, 2024