โ† All examples

geometry 4d

Exact hyperplane slice sweep as glTF morph targets

Sweep a hyperplane through the 5-cell, tesseract, 16-cell or 24-cell and write one glTF mesh whose morph-target animation plays the exact sequence of 3D cross-sections (for example tetrahedron, truncated tetrahedron, octahedron).

Recorded render of Exact hyperplane slice sweep as glTF morph targets

What this component contains

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

How it works

Entry points
make_polytope, direction_vector, tetrahedra, build, positions_at, mesh_measures, exact_measures, morph_error and 6 more
Outputs
example.gltf
Coordinates
slice points in the hyperplane's own x, y, z (fourd.hyperplane_basis; for the normal (0,0,0,1) these are x, y, z), 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_16cell_slices
  • preview_render

Limits to consider

Convex polytopes with planar cells only (the four built in). Where vertex heights tie, a slice corner jumps between two coincident positions inside a 1 ms keyframe pair; the drawn shape does not change there. The mesh holds degenerate zero-area triangles for parts of cells the hyperplane has not reached. The slice frame (hyperplane basis) is fixed for the whole sweep.