Baltor Get started

Gallery / Mesh algorithms

Torus knot tube with parallel-transport frames

In your harnessMesh algorithmMIT

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.

Render of Torus knot tube with parallel-transport frames
The render its check recorded in Godot 4.7.2, 256 by 256 pixels.

What it takes and gives

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

Limits. 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.

Details

Kind
Mesh algorithm
Engine
Python 3.10 or later
Files
10 files, 279.4 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
Torus knot curve ((R + r cos qt) cos pt, r sin qt, -(R + r cos qt) sin pt), Discrete parallel transport of frames (rotation between consecutive tangents), Holonomy correction spread evenly along a closed curve
Tags
torus knot, tube, sweep, parallel transport, knot, trefoil
Identity
library.supply.creative_originals.c3411f3110e56a96f46b92de.27e0793004fc3ba0
Version
27e0793004fc3ba08e217ce9b062a63bd7a708602536fedf891930f213fce79b

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.