โ† All examples

geometry 4d

Schlegel diagrams of convex 4-polytopes

Project a convex 4-polytope from a point just outside one cell onto that cell, so all other cells nest inside it, and write the diagram as a glTF wireframe with the outer cell as a translucent shell. Built-in regular polytopes or any polytope JSON record.

Recorded render of Schlegel diagrams of convex 4-polytopes

What this component contains

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

How it works

Entry points
load_polytope, eye_point, project, outer_faces, inside_outer_cell, depth, meshes, export and 3 more
Outputs
example.gltf
Coordinates
3D coordinates in the chosen cell's hyperplane basis, origin at the cell centroid; 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_schlegel_120cell
  • preview_render

Limits to consider

The polytope must be convex and its record must list cells (the eye position is computed from the cell hyperplanes). The eye sits halfway to the nearest other cell hyperplane; other choices change the nesting depth but not the combinatorics. LINES are one pixel wide in most viewers; the shell relies on the viewer's alpha sorting.