code wiki / _hdl_build / nx_tissue.nx
nx_tissue.nx
buildroot/runtime/_hdl_build/nx_tissue.nx
about
nx_tissue.nx -- PIPELINE STAGE 3: FASCIA + FAT AS SOFT BODY, bridging muscle to skin.
The industry pipeline is skeleton -> muscle -> fascia/fat -> skin, and an audit of our own stack found we
had that pipeline's SHAPE and almost none of its PHYSICS: "fat" was a scalar knob attenuating how much
muscle relief reached the skin. Nothing lagged, nothing settled, nothing was driven by the layer beneath.
It also found that the solver had been built and gated months earlier and NEVER WIRED IN: runtime/
nx_softdyn.nx is a spring-damper soft body whose stability envelope is enforced BY CONSTRUCTION (past a
damping threshold semi-implicit Euler inverts and amplifies velocity, so SD_CAPC/SD_CAPK make an unstable
configuration impossible to REQUEST rather than merely discouraged). It shipped with no soft-tissue
geometry to bind to. The layer emitter now emits muscle and fat layers, so this organ is the wiring.
THE BINDING, and it is what makes this stage 3 rather than just re-running a solver: a LAYER-AWARE
LATTICE. Solver points are seated on a coarse band lattice over the figure; every vertex is displaced by
its band's point SCALED BY THE SOFTNESS OF ITS OWN LAYER. Bone scales to ZERO and does not move at all;
muscle moves partly; skin and fat move fully. That is fascia doing its actual job -- transmitting motion
from the rigid thing inside to the soft thing outside, with each layer lagging by its own amount.
nx_tissue <in.nxmesh> <out.nxmesh> [accel] [K] [C] [steps]
nx_tissue selftest
license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).
dependencies 2 imports · 14 importers
diagram shows first 10 each side; +0 more imports, +4 more importers in the complete lists below.
imports: nx_gate_verdict.nxnx_softdyn.nx
imported by: nx_chunk_paginate.nxnx_chunk_paginate_test.nxnx_ecosystem_compose_test.nxnx_game_engine_compose_test.nxnx_game_session_drive.nxnx_minecraft_mcu_compose_test.nxnx_pets_voxel_view.nxnx_raycast_voxel.nxnx_raycast_voxel_test.nxnx_substrate_compose_test.nxnx_tissue_test.nxnx_voxel_native.nxnx_world_seed.nxnx_world_seed_test.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 25 | const TS_M8388607: i64 = 8388607 |
| 26 | const TS_M8388608: i64 = 8388608 |
| 27 | const TS_HDR: i64 = 16 |
| 28 | const TS_LAYENT: i64 = 24 |
| 29 | const TS_TRI: i64 = 84 |
| 30 | const TS_LID: i64 = 4 |
| 31 | const TS_BANDS: i64 = 24 |
| 32 | const TS_MM: i64 = 1000 |
| 33 | const TS_MODE: i64 = 420 |
| 34 | const TS_MAXD: i64 = 40 |
| 35 | const TS_DEFK: i64 = 900 |
| 36 | const TS_DEFC: i64 = 260 |
| 37 | const TS_DEFA: i64 = 900 |
| 38 | const TS_STEPS: i64 = 40 |
| 39 | const TS_SCR: i64 = 4096 |
functions
| 41 | func ts_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } called by 1: main |
| 42 | func ts_pn(v: i64) -> i64 called by 1: main |
| 51 | func ts_rd32(b: *u8, o: i64) -> i64 |
| 54 | func ts_wr32(b: *u8, o: i64, v: i64) -> i64 called by 1: ts_run |
| 58 | func ts_f32mul(b: *u8, o: i64, mul: i64) -> i64 |
| 72 | func ts_f32of(v: i64) -> i64 called by 1: ts_run |
| 84 | func ts_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 89 | func ts_atoi(s: *u8) -> i64 called by 1: main |
| 99 | func ts_soft(layer: i64) -> i64 |
| 106 | func ts_run(inp: *u8, outp: *u8, accel: i64, K: i64, C: i64, steps: i64, out: *i64) -> i64 |
| 211 | func ts_gate() -> i64 |
| 281 | func main(argc: i64, argv: *i64) -> i64 |