โ† All examples

mesh algorithms

Centripetal Catmull-Rom spline

Interpolate a curve through control points with uniform, centripetal or chordal Catmull-Rom parameterization, open or closed. Use it for paths through waypoints, camera rails and track layouts.

Recorded render of Centripetal Catmull-Rom spline

What this component contains

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

How it works

Entry points
catmull_rom_point, catmull_rom, build, main
Parameters
alpha, closed, samples_per_segment
Complexity
O(points * samples_per_segment)
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

Interpolating splines have only C1 continuity at the control points (curvature may jump). Coincident consecutive control points are separated by a tiny knot gap. Open ends use reflected neighbour points, one of several conventions.