nx_body_proc_boundary_candidate_t345.nx
buildroot/runtime/nx_body_proc_boundary_candidate_t345.nx
about
nx_body_proc.nx -- ★SOVEREIGN PROCEDURAL BODY-CANON GENERATOR (Infinigen-style). Infinigen is the CAPABILITY
benchmark -- infinite variety of bodies GENERATED procedurally from parameters + a seed, ZERO hand-crafted
or scanned assets. This is the sovereign version: it does not store a body, it stores the RULES that make
one. It emits a canon.dat (the P/R/F rows nx_body_gen reads) computed from anthropometric FUNCTIONS of a
few high-level knobs, with seeded procedural noise so no two seeds are identical.
nx_body_proc <out.dat> <sex 0-1000> <build 0-1000> <musc 0-1000> <noise 0-1000> <seed> [stylize 0-1000]
sex 0=male anatomy .. 1000=female (shoulders<->hips, waist, bust)
build 0=lean .. 1000=heavy (girth added at waist/limbs)
musc 0=soft .. 1000=muscular (limb girth + muscle-relief amplitude)
noise individual variation amplitude, per-mille of each radius (0=canonical template)
seed any integer -> a specific individual
stylize 0=realistic .. 1000=anime/stylized (bigger head, longer legs, slimmer limps, bigger eyes)
license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_syscalls.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 K_MAGIC_1750: i64 = 1750 |
| 17 | const K_MAGIC_1000000: i64 = 1000000 |
| 18 | const K_MAGIC_2654435761: i64 = 2654435761 |
| 19 | const K_MAGIC_1013904223: i64 = 1013904223 |
| 20 | const K_MAGIC_65536: i64 = 65536 |
| 28 | const BP_TROCH: i64 = 530 |
| 29 | const BP_ACROMION: i64 = 818 |
| 403 | const BP_SKJ: i64 = 64 |
| 456 | const BP_NDIM: i64 = 21 |
functions
| 32 | func pr_step(st: *i64) -> i64 { var x: i64 = st[0]; x = x ^ (x << 13); x = x ^ ((x >> 7) & 0x1ffffffffffff); x = x ^ (x << 17); st[0] = x & 0x7fffffffffffffff; return st[0] } |
| 34 | func pr_pm(st: *i64, amp: i64) -> i64 { if amp <= 0 { return 0 } let r: i64 = pr_step(st) % (2*amp + 1); return r - amp } |
| 36 | func pw(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n+1 } sys_write(fd, s, n); return 0 } |
| 38 | func wint(b: *u8, pos: *i64, v: i64, c: i64) -> i64 |
| 49 | func satoi(s: *u8) -> i64 { var i: i64=0; var n: i64=0; var sg: i64=1; if s[0]==(45 as u8){sg=0-1;i=1} |
| 59 | func emitR(b: *u8, pos: *i64, st: *i64, noise: i64, y: i64, xoff: i64, zoff: i64, ra: i64, rb: i64) -> i64 |
| 67 | func emitPm(b: *u8, pos: *i64, st: *i64, noise: i64, mir: i64, rot: i64, ox: i64, oy: i64, oz: i64, mat: i64) -> i64 |
| 87 | func emitPmZ(b: *u8, pos: *i64, st: *i64, noise: i64, mir: i64, rot: i64, ox: i64, oy: i64, oz: i64, mat: i64, rotz: i64) -> i64 |
| 95 | func emitP(b: *u8, pos: *i64, st: *i64, noise: i64, mir: i64, rot: i64, ox: i64, oy: i64, oz: i64) -> i64 |
| 104 | func emitDigitP(b: *u8, pos: *i64, st: *i64, fx: i64, fz: i64, baseY: i64, tipY: i64, rad: i64, |
| 119 | func emitLimbTube(b: *u8, pos: *i64, st: *i64, noise: i64, n: i64, y0: i64, y1: i64, x0: i64, x1: i64, calls 1: emitR |
| 154 | func emitRaySet(b: *u8, pos: *i64, st: *i64, cx: i64, halfw: i64, baseY: i64, maxLen: i64, radB: i64, |
| 173 | func emitDigit(b: *u8, pos: *i64, st: *i64, fx: i64, fz: i64, baseY: i64, tipY: i64, rad: i64) -> i64 |
| 193 | func emitNose(b: *u8, pos: *i64, st: *i64, sexf: i64, sty: i64, faceZ: i64, mat: i64) -> i64 |
| 232 | func emitLips(b: *u8, pos: *i64, st: *i64, sexf: i64, sty: i64, faceZ: i64, mat: i64) -> i64 |
| 244 | func emitChin(b: *u8, pos: *i64, st: *i64, sexf: i64, sty: i64, faceZ: i64, mat: i64) -> i64 |
| 263 | func emitChinZ(b: *u8, pos: *i64, st: *i64, sexf: i64, sty: i64, headRb: i64, mat: i64) -> i64 |
| 295 | func emitLipZ(b: *u8, pos: *i64, st: *i64, sty: i64, headRb: i64, mat: i64, lipY: i64, full: i64) -> i64 |
| 326 | func emitBrowZ(b: *u8, pos: *i64, st: *i64, sexf: i64, sty: i64, headRb: i64, mat: i64) -> i64 |
| 353 | func emitBrow(b: *u8, pos: *i64, st: *i64, sexf: i64, sty: i64, ex: i64, faceZ: i64, mat: i64) -> i64 |
| 367 | func emitEar(b: *u8, pos: *i64, st: *i64, sty: i64, ex: i64, ez: i64, mat: i64) -> i64 |
| 378 | func emitEye(b: *u8, pos: *i64, st: *i64, ey: i64, ex: i64, ez: i64, r: i64, mat: i64) -> i64 |
| 387 | func emitF(b: *u8, pos: *i64, part: i64, y: i64, yw: i64, th: i64, tw: i64, amp: i64) -> i64 |
| 404 | func bp_skel_load(path: *u8, J: *i64, stature: i64) -> i64 |
| 457 | func bp_err(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(2, s, n); return 0 } |
| 460 | func bp_rdint(b: *u8, pos: *i64, end: i64) -> i64 called by 1: bp_load_dimorph_from |
| 482 | func bp_load_dimorph_from(D: *i64, path: *u8) -> i64 |
| 515 | func bp_load_dimorph(D: *i64) -> i64 { return bp_load_dimorph_from(D, "knowledge/body_dimorphism.conf" as *u8) } |
| 516 | func bp_streq(a: *u8, b2: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b2[i] { return 0 } i = i + 1 } if b2[i] != (0 as u8) { return 0 } return 1 } |
| 517 | func bp_pnum(v: i64) -> i64 |
| 532 | func bp_thoracic_floor(g: i64) -> i64 { return 30 + g } |
| 535 | func bp_waist_of(D: *i64, sexf: i64, build: i64) -> i64 { return D[4] - D[5]*sexf/1000 + D[6]*build/1000 } |
| 536 | func bp_girth_of(D: *i64, build: i64) -> i64 { return build*D[13]/1000 } |
| 537 | func bp_floorcheck(sexf: i64, build: i64, dp: *u8) -> i64 called by 1: bp_semantic_generate calls 7: sys_mmapbp_load_dimorph_frombp_waist_ofbp_girth_ofbp_thoracic_floorpw+1 |
| 549 | func bp_tok(b: *u8, pos: *i64, end: i64, out: *u8, cap: i64) -> i64 called by 1: bp_evidence_grade |
| 573 | func bp_find(hay: *u8, hn: i64, needle: *u8) -> i64 called by 1: bp_evidence_grade |
| 587 | func bp_ev_refuse(reason: *u8, m: *u8) -> i64 |
| 601 | func bp_evidence_grade(cp: *u8, rp: *u8) -> i64 |
| 687 | func bp_emitted_parts(b:*u8,n:i64)->i64{var i:i64=0;var count:i64=0;while i<n{if b[i]==80 as u8{if i==0{count=count+1}else{if b[i-1]==10 as u8{count=count+1}}};i=i+1};return count} called by 1: bp_semantic_generate |
| 688 | func bp_semantic_generate(argc: i64, argv: *i64) -> i64 |
| 1106 | func main(argc:i64,argv:*i64)->i64 |