Improve the code or add a solid
Pull requests are welcome; CONTRIBUTING.md has the details. Adding a solid takes four steps:
- Define it in
polyhedra.py (high-precision vertices; faces are derived from the hull and checked) and run it to regenerate src/solids.json, including the r-rounding cores used by the soft shapes.
- Give its number field in
scripts/exact_solids.py and run it; it finds exact coordinates and proves them right, writing src/solids_exact.json.
- Add the problem id to
scripts/engine.py (AB, the family lists) and start the search with scripts/run_forever.sh.
- Publish with
python3 scripts/publish.py: record files, certificates and this site are rebuilt from the archive.
The same JSON as the record files. Pieces are copies of the canonical piece solid of
src/solids.json (50-digit coordinates in
src/solids_hp.json, exact ones in
src/solids_exact.json), each rotated by a
scalar-first quaternion and then moved to its centre. The container is s_full times the canonical container
solid, centred at the origin (or at container_center) in its canonical orientation.
{
"piece": "truncated_octahedron",
"container": "truncated_octahedron",
"n": 2,
"s_full": 2.0000001,
"pieces": [
[x, y, z, qw, qx, qy, qz],
[x, y, z, qw, qx, qy, qz]
]
}
Canonical solids have unit edges (Platonic and Archimedean solids, prisms, antiprisms). A Catalan solid is the
canonical dual of the unit-edge Archimedean solid, reflected in their common midsphere, and its s is a ratio of sizes of
that same solid. Names are the keys of src/solids.json: .