โ† All examples

mesh algorithms

Torus knot tube with parallel-transport frames

Sweep a circle along a (p, q) torus knot with parallel-transport frames closed by an even twist, so the closed tube has no twist seam. Use it for knot sculpture, jewellery and decorative pipes.

Recorded render of Torus knot tube with parallel-transport frames

What this component contains

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

How it works

Entry points
knot_point, knot_tangent, transport_frames, torus_knot, main
Parameters
p, q, major_radius, minor_radius, tube_radius, segments, sides
Complexity
O(segments * sides)
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

The tube does not test for self-intersection: keep tube_radius below half the closest approach of the strands (true for the defaults). No texture coordinates. The volume and area checks compare with cross-section times curve length within 0.4 percent.