Baltor Get started

Gallery / Mesh algorithms

B-spline curves with de Boor evaluation and knot insertion

In your harnessMesh algorithmMIT

Evaluate clamped and periodic B-spline curves of any degree with de Boor's algorithm, compute Cox-de Boor basis functions and insert knots without changing the curve. Use it for smooth paths, animation curves and CAD-style editing.

Render of B-spline curves with de Boor evaluation and knot insertion
The render its check recorded in Godot 4.7.2, 256 by 256 pixels.

What it takes and gives

Entry points
clamped_knots, de_boor, basis_functions, insert_knot, sample_curve, build, main
Parameters
degree, closed, samples
Complexity
O(degree^2) per point
Axes
+Y up, metres

Limits. Non-rational only (see nurbs_curve for weights). Knot vectors must be non-decreasing with the usual multiplicity limits; clamped_knots builds uniform interior knots only. The control polygon in the display mesh is a LINES primitive, which draws one pixel wide in most viewers.

Details

Kind
Mesh algorithm
Engine
Python 3.10 or later
Files
10 files, 250.7 KB
Licence
MIT
Declared effects
reads files, runs commands, writes files
Checked with
Godot 4.7.2, gl_compatibility, OpenGL 3 driver, Mesa llvmpipe under Xvfb
Checks
generator runs system python, generator runs verifier python, gltf strict structure, interpreters agree, example matches generator, godot headless gltf load, godot compatibility render
Techniques
de Boor's algorithm, Cox-de Boor recursion, Boehm knot insertion, Clamped and periodic uniform knot vectors
Tags
b-spline, de boor, knot insertion, curve, basis functions, cad
Identity
library.supply.creative_originals.a1ecb28fce2b5bf07e7dc897.5cfe74254a276eb4
Version
5cfe74254a276eb457f89cb606e196bddd2430b74fbdc40f3d01257df8d56f03

The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.

Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.