Commonplace kernel API
    Preparing search index...

    Function decomposeNurbsSurfaceToRationalBezierPatches

    • Experimental

      Decompose a bicubic NURBS surface into a 2D grid of rational bicubic Bezier patches via tensor-product knot insertion (Piegl & Tiller §5.6, tensor form).

      Algorithm:

      1. Validate degrees, sizes, knot lengths, clamping, monotonicity, positive weights.
      2. Lift the entire control net to homogeneous 4D coords: H_{i,j} = (w_{i,j} P_{i,j}, w_{i,j}).
      3. U-pass. For each distinct internal u-knot value, insert it (p - s) more times into knotsU. Each insertion is the standard 1D update applied to every v-column in parallel — the α coefficients depend only on knotsU, so columns share the same convex combinations. After this pass, every internal u-knot has multiplicity p_u = 3 and the net's u-extent grew accordingly.
      4. V-pass. Same thing in v-direction: for each distinct internal v-knot, insert (p - s) times applied to every u-row in parallel.
      5. Extract patches. After both passes the net partitions into numPiecesU × numPiecesV blocks of 4×4 controls each. Project each block back to 3D to form a RationalBezierBicubicPatch.

      Parameters

      Returns RationalBezierBicubicPatch[][]

      A 2D array pieces[i][j] of rational bicubic Bezier patches, with i indexing the u-direction Bezier strip and j indexing the v-direction within that strip. Adjacent patches share an edge: the v-direction control row at the seam of pieces[i][j] and pieces[i + 1][j] carry the same four 3D points (and vice versa for u-seams).

      If the input violates any invariant.

      2026-Q2

      experimental — stable-by target: 2027-Q1