Baltor Get started

Gallery / Mesh algorithms

Torus with wrapped texture coordinates

In your harnessMesh algorithmMIT

Build a ring torus around the Y axis with unit normals and a texture grid that wraps in both directions. Use it for rings, donuts, tyres and as a genus-one test surface.

Render of Torus with wrapped texture coordinates
The render its check recorded in Godot 4.7.2, 256 by 256 pixels.

What it takes and gives

Entry points
torus, main
Parameters
major_radius, minor_radius, segments, sides
Complexity
O(segments * sides)
Axes
+Y up, metres

Limits. The texture seam duplicates one row and one column, so the mesh is closed only after welding. Self-intersecting (horn and spindle) tori, with the minor radius at or above the major radius, are not handled specially. The polygon volume is below the smooth torus's.

Details

Kind
Mesh algorithm
Engine
Python 3.10 or later
Files
10 files, 239.2 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 parameterization ((R + r cos v) cos u, r sin v, -(R + r cos v) sin u), Polygonal surface of revolution
Tags
primitive, torus, ring, genus one, texture coordinates, donut
Identity
library.supply.creative_originals.b86bfc7bbf524b00e1ecf57d.70d0b2b1de51b8cc
Version
70d0b2b1de51b8cc5e6bc4d09dc730707c60e67498d6b66e82eb2eccd0f647f0

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.