code wiki / _hdl_build / nx_sqprim_gate.nx
nx_sqprim_gate.nx
buildroot/runtime/_hdl_build/nx_sqprim_gate.nx
about
nx_sqprim_gate.nx -- teeth for the SUPERQUADRIC primitive in nx_bodyatlas (2026-07-27).
★WHY: every part in the atlas was an axis-aligned ELLIPSOID. The literature calls that the EARLY
formulation for anatomy; the modern primitive is the GENERALIZED CYLINDER, of which superquadrics are
the superelliptical-cross-section subset (6 pose + 3 size + 2 SHAPE parameters). An ellipsoid cannot
express a vertebral body (boxy) or a tapering muscle belly (pinched) -- not badly, AT ALL, because it
has no shape degree of freedom. This gate proves the exponent is a real DOF and not a relabel.
★THE ORDERING IS THE POINT AND IT IS MEASURED, NOT ASSERTED: for a fixed radius the enclosed volume
must be strictly increasing in the exponent -- a diamond is inside an ellipsoid is inside a rounded
box -- because higher exponents push the surface out toward the corners of the bounding box.
expect_exit: 0 license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 2 imports · 0 importers
imports: nx_bodyatlas.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 16 | const SQ_ONE: i64 = 1024 |
| 17 | const SQ_G: i64 = 24 // grid half-extent for the volume count |
| 18 | const SQ_R: i64 = 1000 // part radius used by the fixtures |
functions
| 21 | func sq_volume(e: i64) -> i64 |
| 42 | func main() -> i64 |