code wiki / _hdl_build / nx_creatorfit.nx

nx_creatorfit.nx

buildroot/runtime/_hdl_build/nx_creatorfit.nx

16105 B299 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_creatorfit.nx -- ★★★CREATOR: THE INVERSE LOOP. Everything else in this programme runs FORWARD -- parameters and a seed produce a body. This runs BACKWARD: given a body, recover the parameters that would have produced it. That inversion is the whole difference between generating *a* person and twinning *this* person, and it is the step a scan-based model cannot offer at all, because a scan has no parameters to solve for -- only vertices. ★★WHY THE PROCEDURAL BASIS IS THE RIGHT THING TO FIT, and it is not a consolation prize. The search space is a few dozen anatomically meaningful integers, and **it cannot express an anatomically impossible human** -- so the fit physically cannot chase noise into a body that could not exist. Free-form mesh deformation can, and does: it will happily fit a scanning artifact by growing a spike. Every point this optimiser can reach is a body the generator would have been willing to emit unprompted. The measured stakes (SOTA, July 2026): a scan-free parametric model fits a real subject to ~2.4mm, against ~1.8mm for a model trained on six hundred thousand scans. A ~0.6mm penalty for owning your own generator. ★★★COMPOSITION, NOT REIMPLEMENTATION -- the design constraint that shaped this organ. A fitter needs to (a) build a candidate body and (b) measure it. Both already exist as proven organs, so this one FORKS them: nx_body_proc -> canon, nx_body_gen -> mesh, nx_twinbench rms -> one integer of error. It carries NO copy of the canon rules and NO copy of the distance metric. A fitter with its own metric is a fitter that can score beautifully against a ruler nobody else agrees with, and the two copies drift the moment either is improved. ★★THE TOOTH THAT GATES EVERYTHING: SYNTHETIC RECOVERY. Before this may be pointed at a person it must be pointed at a body whose parameters are already KNOWN -- generate a target from a chosen vector, hide the vector, and demand the optimiser find it. Anything else is unfalsifiable: on a real subject there is no answer key, so a broken optimiser and a working one both produce "a number that went down". nx_creatorfit probe <target.nxmesh> <sex> <build> <musc> -> rms error of one candidate, micrometres nx_creatorfit fit <target.nxmesh> -> recovered vector, coarse-to-fine nx_creatorfit selftest license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).

dependencies 1 imports · 0 importers

nx_gate_verdict.nx nx_creatorfit.nx

imports: nx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main cf_streq cf_gate gv_ctr sys_mmap gv_head gv_puts sys_write cf_probe cf_itoa cf_run sys_fork sys_execve sys_wait4 wait_exit_code sys_pipe2 sys_fork ↻ sys_dup3 sys_execve ↻ sys_read sys_wait4 ↻ cf_atoi gv_check gv_puts ↻ cf_fit cf_probe ↻ gv_verdict gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_journal sys_openat_append sys_mmap ↻ gv_catn sys_mmap ↻ sys_munmap ↻ sys_now_realtime_sec sys_mmap ↻

structs

none

consts

33const CF_STATURE: i64 = 1750
39const CF_RADIAL: i64 = 10
40const CF_SUB: i64 = 1
41const CF_RELIEF: i64 = 1000
42const CF_BIG: i64 = 4611686018427387903
45const CF_KNOBS: i64 = 3
46const CF_LO: i64 = 0
47const CF_HI: i64 = 1000
49const CF_STEP0: i64 = 250
50const CF_PASSES: i64 = 4
51const CF_SAMPLES: i64 = 3000
52const CF_ARGBUF: i64 = 256

functions

54func cf_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
55func cf_pn(v: i64) -> i64
called by 1: main
64func cf_streq(a: *u8, b: *u8) -> i64
called by 1: main
69func cf_atoi(s: *u8) -> i64
called by 2: cf_probemain
76func cf_itoa(v: i64, b: *u8) -> *u8
called by 1: cf_probe
94func cf_run(path: *u8, a: *i64, nargs: i64) -> i64
120func cf_probe(target: *u8, sex: i64, build: i64, musc: i64, tmpc: *u8, tmpm: *u8) -> i64
178func cf_fit(target: *u8, out: *i64, tmpc: *u8, tmpm: *u8) -> i64
called by 2: cf_gatemain calls 1: cf_probe
221func cf_gate() -> i64
271func main(argc: i64, argv: *i64) -> i64