โ† All examples

mesh algorithms

B-spline curves with de Boor evaluation and knot insertion

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.

Recorded render of B-spline curves with de Boor evaluation and knot insertion

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • bspline_de_boor.py
  • component.json
  • example.gltf
  • meshkit.py
  • preview.png
  • test_package.py
  • verification/native.json

How it works

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

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • generator_runs_system_python
  • generator_runs_verifier_python
  • gltf_strict_structure
  • interpreters_agree
  • example_matches_generator
  • godot_headless_gltf_load
  • godot_compatibility_render

Limits to consider

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.