Polyhedra in Polyhedra

Contribute

Help improve a living catalogue of polyhedral and higher-dimensional polytope packings. Submit a smaller container, share another construction, contribute a proof or propose a new category. Public GitHub issues and pull requests keep the data, source credit and review inspectable.

The current catalogue has 10,404 cases in 140 problems. Its 3D problems include all 25 ordered Platonic-solid pairs, the 13 Archimedean and 13 Catalan self-packing families, and 35 prism and antiprism problems, including elongated prisms. The higher-dimensional section covers all ordered pairs of the six regular 4-polytopes and of the simplex, hypercube and orthoplex in both 5D and 6D. The current search ranges are n = 2–100 in 3D, 2–40 in 4D, 2–32 in 5D and 2–24 in 6D; the live tables show which cases have records.

Check and submit a 3D packing

Paste a 3D packing below. Your browser checks containment and pairwise separation in floating point and draws a preview. Passing this check enables Submit on GitHub, which opens a pre-filled issue for you to review and submit. The repository then runs an independent exact check. A browser pass is a useful diagnostic; the exact certificate establishes that the submitted coordinates fit.

The local check sends nothing anywhere. Submission needs a GitHub account and an explicit issue submission. This browser tool supports 3D convex solids from the library, with 1–200 pieces. For dimensions 4–6, use the higher-dimensional route below.

For multiple 3D packings, use the GitHub packing form and follow the batch instructions. To share a construction that does not improve the current scale, use Share another construction.

Results appear here after you check a packing.

What happens after a 3D submission

  1. The issue receives the submission label. The submission workflow parses the witnesses as data, runs verify_general.py and certify_general.py, and reports each candidate's result and comparison with the current certified coordinate record. Published bounds without available coordinates are reported separately.
  2. A maintainer reviews certified improvements or missing cases. Applying accepted reruns the checks against the current archive; an edited submission or a newer competing record can change the outcome.
  3. Eligible improvements are stored as immutable community witnesses with source credit, exact certificates and float-check logs. The site is rebuilt. Batches that still contain deferred or unresolved candidates remain open for review.

Acceptance requires a strictly smaller s_full than the current certified coordinate record (the comparison uses a 10−12 tolerance), or a case without one. Equal-scale alternatives, symmetric arrangements, proofs, lower bounds and reconstructions remain useful: share those through the construction form for review. A feasible witness supplies an upper bound on the minimum container scale. Optimality needs a matching lower bound or a separate proof.

Clearance and precision

The current certifiers require every piece to lie strictly inside the container and each pair to have a positive separating gap. Preserve full coordinate precision and test the final s_full, rather than a rounded table label or a touching-limit estimate. The claim builders src/claim.py and src/claim_nd.py can construct clearance and round the container outward. A gap near 10−7 piece edges is a common project setting, not a universal minimum; smaller positive gaps may certify. Uniformly enlarging the container alone does not separate touching pieces: recheck both containment and pairwise separation after any change.

Submit a 3D batch

In the packing form, supply a JSON array of complete records, an object {"records": [...]}, or GitHub user-attachment ZIP links in Batch archives. Every record needs its own piece, container, n, s_full and pieces. Put native witnesses under records/ or witnesses/. A top-level MANIFEST.json may select them with {"cases": [{"file": "records/example.json", "sha256": "…"}]}; witness/witness_sha256 entries are also supported.

The 3D batch limits are 2,000 candidates, eight ZIPs, 64 MiB compressed and 256 MiB expanded per ZIP, 8 MiB per witness, and 12,000 ZIP entries. Source/history files and submitted scripts are ignored; submitted code is never run. Every candidate gets its own outcome. The workflow artifact contains complete JSON/CSV results and checker logs even when the issue comment is abbreviated. Large batches may reach the 70-minute checking budget; a deferred candidate has not yet been certified and needs a later review or a smaller resubmission.

Credit, sources and refinements

Give the original construction's author or team, the method, a source URL, and any prior packing used as a seed. For a batch, preserve each record's found_by and credit fields. If only the safety padding or certificate changes, retain the construction author and identify certificate_refined_by separately. If a construction is derived by deletion, nesting, scaling or subsequent search, explain that lineage. Credit for a refinement or reconstruction does not by itself establish a new geometric discovery.

The method page traces the project's search methods and their sources, including Alejandro Zarzuelo Urdiales's generalization of Yohei Nakajima's soft-to-rigid method and subsequent community contributions. Include enough detail to distinguish your contribution from its starting point. The issue form also asks permission to publish the submitted material under the repository's MIT license; credit any outside source and make its applicable permission or license clear.

Submit a 4D, 5D or 6D packing

Higher-dimensional packings have a separate exact format and a maintainer-run intake route. Open a construction issue or a pull request with native JSON records, your name or team, method, sources and publication permission. For a batch, attach a ZIP to GitHub and include its SHA-256 checksum. Use the canonical polytope keys and exact coordinate frames in src/polytopes_nd.json. The 3D browser form and its accepted-label workflow do not process these records.

  1. Run python3 certify_nd.py my-record.json locally from a repository checkout. This verifier uses Python's standard library and the repository's exact polytope data. Supply the native rotation parameters and separating hyperplanes described below.
  2. A maintainer runs the nd-submission workflow with the GitHub attachment URL, expected SHA-256 and issue number. It runs this repository's certify_nd.py separately on each native record and saves the results and logs as an artifact.
  3. The maintainer imports certified improvements using scripts/import_nd_submission.py. This converts the exact frame to search units, rechecks the geometry, compares the current archive and retains contributor/issue credit. publish_nd.py then creates the published witness and a fresh exact certificate. The record must fit a tracked problem and its current n range to enter this archive.

The site displays these packings as 3D sections with sliders for the remaining coordinates and an optional sweep. A screenshot of a section is helpful context; the full-dimensional coordinates and certificate are the submission evidence.

Propose a new category

For a new 3D pair, describe the convex piece and container, their canonical coordinates and scale convention, the desired n range, and known constructions or references. The form below opens a public category proposal; maintainers review the geometry, search and exact-checker support before adding it. For a new higher-dimensional polytope, use a construction issue or pull request and include its dimension and facets.

The present record/checker model uses congruent copies of one convex piece inside one convex container. Mixed-piece or nonconvex problems need an explicit extension. Planar square/circle packings and curved containers are outside the catalogue's scope.

Share another construction

Share a symmetric or equal-scale alternative, a lattice or tiling construction, a proof, a lower bound, a physical model, or a historical source. Include coordinates where available and distinguish a conjectured formula from a proved value. These issues are reviewed separately from automatic record acceptance. This form also provides the entry point for higher-dimensional contributions.

Improve the code or add a solid

Pull requests are welcome; CONTRIBUTING.md describes local checks. Keep search, rigorous verification and presentation as separate stages.

  1. For a new 3D solid, define high-precision vertices in polyhedra.py and regenerate src/solids.json and src/solids_hp.json. Add its number field and exact construction in scripts/exact_solids.py, and regenerate and self-check src/solids_exact.json.
  2. Register a 3D problem in scripts/engine.py (PROBLEMS and the family lists). Higher-dimensional geometry and pair definitions instead live in src/polytopes_nd.py and scripts/engine_nd.py. A new nD solid also needs exact verifier support, including the appropriate facet checks.
  3. Run the relevant geometry, certification and site checks. Maintainer publication uses scripts/publish.py / scripts/publish_nd.py; python3 scripts/site.py builds the local site from the records and certificates. Records enter the public catalogue only after review and the relevant checks.

3D packing format

Use the same JSON as the record files. Canonical solids are in src/solids.json (high-precision coordinates in src/solids_hp.json, exact definitions in src/solids_exact.json). Each piece row is [x, y, z, qw, qx, qy, qz]: a scalar-first quaternion rotates the canonical piece, then its centre translates it. The quaternion must be nonzero and is normalized by the checker. The container is s_full times the canonical container in its canonical orientation, centred at the origin or at the optional container_center.

This complete example places two unit cubes in a larger cube with positive gaps:

{
  "piece": "cube",
  "container": "cube",
  "n": 2,
  "s_full": 2.2,
  "pieces": [
    [-0.55, 0, 0, 1, 0, 0, 0],
    [ 0.55, 0, 0, 1, 0, 0, 0]
  ]
}

Platonic and Archimedean solids and the regular unit-edge prisms/antiprisms use unit-edge geometry. Elongated prism keys encode their fixed aspect ratio; their base edge defines the size unit. Catalan solids use the canonical dual of the corresponding unit-edge Archimedean solid, obtained by polar reciprocity in their common midsphere, and use that canonical size convention. Use the recorded normalization when comparing scales or densities; do not rescale a source's coordinates without documenting the conversion. Available 3D keys: .

Higher-dimensional native format

In dimensions d = 4, 5 or 6, each pieces row contains d centre coordinates, the d(d−1)/2 upper-triangular entries of a skew-symmetric matrix S (row by row), and d signs D, in that order. The signs are ±1 with an even number of −1 entries, and the exact rotation is R = diag(D) (I − S)−1 (I + S). The container is container_center + s_full × mu × C, where C is the canonical container polytope and mu = edge(P) / edge(C) is required and checked exactly. Thus s_full remains the ratio of container edge to piece edge even when the two stored canonical polytopes have different edge lengths.

A plane row [i, j, u_1, …, u_d, t] uses zero-based piece indices and proves u·x < t for piece i and u·x > t for piece j. Supply a plane for every pair not already separated by the verifier's circumscribed-ball test. Coordinates and plane parameters may be finite JSON numbers or rational strings such as "1/2". Preserve the native values: display-rounded poses or an arbitrary floating rotation matrix are not this certificate format.

This complete example certifies two tesseracts; each row has 4 centre coordinates, 6 zero skew parameters and 4 positive signs. Save it as two-tesseracts.json and run python3 certify_nd.py two-tesseracts.json:

{
  "dim": 4,
  "piece": "c8",
  "container": "c8",
  "n": 2,
  "s_full": 2.2,
  "mu": "1",
  "pieces": [
    [-0.55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1],
    [ 0.55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
  ],
  "planes": [[0, 1, 1, 0, 0, 0, 0]]
}

4D keys: c5 (5-cell), c8 (tesseract), c16 (16-cell), c24 (24-cell), c120 (120-cell), c600 (600-cell). 5D: sx5, hc5, op5; 6D: sx6, hc6, op6, for the simplex, hypercube and orthoplex respectively. Piece and container must have the same dimension. For producing a native record from numerical centre/rotation arrays, see claim_nd.make_claim and its documented internal-unit conversion.