โ† All examples

geometry 4d

Clifford torus in the 3-sphere

Parametrize the flat Clifford torus in S3, check its flat metric, area 2 pi^2, the two solid tori of volume pi^2 it bounds and its linked core circles, and write its stereographic image turning in 4D as a looping glTF morph animation.

Recorded render of Clifford torus in the 3-sphere

What this component contains

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

How it works

Entry points
point, metric, area, solid_torus_volumes, is_clifford, stereographic_from, core_linking, image_radii and 6 more
Outputs
example.gltf
Coordinates
(cos u, sin u, cos v, sin v)/sqrt(2) in x, y, z, w; stereographic image from (0, 0, 0, 1), Godot/glTF +Y up

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • cli_rebuilds_example
  • gltf_structure_example
  • cli_example_runs
  • cli_example_gltf_structure
  • godot_loads_example
  • godot_loads_cli_clifford_yz
  • preview_render

Limits to consider

The animation stores 16 keyframes per loop as morph targets (positions and normals), so between keyframes vertices move along chords and the surface shrinks slightly. Rotation planes containing w are refused because they carry points through the projection pole. The solid torus volumes come from Simpson's rule (error near 1e-10).