โ† All examples

mesh algorithms

NURBS surfaces with exact sphere and torus

Evaluate and tessellate tensor-product NURBS surfaces, including exact spheres and tori built as surfaces of revolution from rational profiles. Use it for CAD-style surfaces and exact round shapes.

Recorded render of NURBS surfaces with exact sphere and torus

What this component contains

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

How it works

Entry points
surface_point, revolve_profile, sphere_surface, torus_surface, wave_surface, tessellate, build, main
Parameters
shape, u_samples, v_samples
Complexity
O(u_samples * v_samples * (degree_u + 1)(degree_v + 1))
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

Uniform parameter sampling, not curvature adaptive. The sphere's poles and the closed seam are repeated grid points, so closed results are watertight after welding. Normals come from central differences in parameter space, with mesh normals at the poles.