code wiki / _hdl_build / nx_body_proc.nx

nx_body_proc.nx

buildroot/runtime/_hdl_build/nx_body_proc.nx

64935 B840 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic body
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_body_proc.nx

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

main satoi sys_mmap bp_skel_load sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close pw sys_write pr_step emitP emitPm pr_pm pr_step ↻ wint sys_mmap ↻ emitR wint ↻ emitRaySet emitDigitP emitP ↻ emitR ↻ emitPm ↻ emitDigit emitP ↻ emitR ↻ emitEye emitPm ↻ emitR ↻ emitNose emitPm ↻ emitR ↻ emitBrowZ emitPmZ pr_pm ↻ wint ↻

structs

none

consts

16const K_MAGIC_1750: i64 = 1750
17const K_MAGIC_1000000: i64 = 1000000
18const K_MAGIC_2654435761: i64 = 2654435761
19const K_MAGIC_1013904223: i64 = 1013904223
20const K_MAGIC_65536: i64 = 65536
28const BP_TROCH: i64 = 530
29const BP_ACROMION: i64 = 818
403const BP_SKJ: i64 = 64

functions

32func 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] }
called by 2: pr_pmmain
34func pr_pm(st: *i64, amp: i64) -> i64 { if amp <= 0 { return 0 } let r: i64 = pr_step(st) % (2*amp + 1); return r - amp }
called by 2: emitPmemitPmZ calls 1: pr_step
36func 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 }
called by 1: main calls 1: sys_write
38func wint(b: *u8, pos: *i64, v: i64, c: i64) -> i64
49func 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}
called by 1: main
59func emitR(b: *u8, pos: *i64, st: *i64, noise: i64, y: i64, xoff: i64, zoff: i64, ra: i64, rb: i64) -> i64
67func emitPm(b: *u8, pos: *i64, st: *i64, noise: i64, mir: i64, rot: i64, ox: i64, oy: i64, oz: i64, mat: i64) -> i64
87func emitPmZ(b: *u8, pos: *i64, st: *i64, noise: i64, mir: i64, rot: i64, ox: i64, oy: i64, oz: i64, mat: i64, rotz: i64) -> i64
95func emitP(b: *u8, pos: *i64, st: *i64, noise: i64, mir: i64, rot: i64, ox: i64, oy: i64, oz: i64) -> i64
called by 3: emitDigitPemitDigitmain calls 1: emitPm
104func emitDigitP(b: *u8, pos: *i64, st: *i64, fx: i64, fz: i64, baseY: i64, tipY: i64, rad: i64,
called by 1: emitRaySet calls 2: emitPemitR
119func emitLimbTube(b: *u8, pos: *i64, st: *i64, noise: i64, n: i64, y0: i64, y1: i64, x0: i64, x1: i64,
calls 1: emitR
154func emitRaySet(b: *u8, pos: *i64, st: *i64, cx: i64, halfw: i64, baseY: i64, maxLen: i64, radB: i64,
called by 1: main calls 1: emitDigitP
173func emitDigit(b: *u8, pos: *i64, st: *i64, fx: i64, fz: i64, baseY: i64, tipY: i64, rad: i64) -> i64
called by 1: main calls 2: emitPemitR
193func emitNose(b: *u8, pos: *i64, st: *i64, sexf: i64, sty: i64, faceZ: i64, mat: i64) -> i64
called by 1: main calls 2: emitPmemitR
232func emitLips(b: *u8, pos: *i64, st: *i64, sexf: i64, sty: i64, faceZ: i64, mat: i64) -> i64
calls 2: emitPmemitR
244func emitChin(b: *u8, pos: *i64, st: *i64, sexf: i64, sty: i64, faceZ: i64, mat: i64) -> i64
calls 2: emitPmemitR
263func emitChinZ(b: *u8, pos: *i64, st: *i64, sexf: i64, sty: i64, headRb: i64, mat: i64) -> i64
calls 2: emitPmZemitR
295func emitLipZ(b: *u8, pos: *i64, st: *i64, sty: i64, headRb: i64, mat: i64, lipY: i64, full: i64) -> i64
called by 1: main calls 2: emitPmZemitR
326func emitBrowZ(b: *u8, pos: *i64, st: *i64, sexf: i64, sty: i64, headRb: i64, mat: i64) -> i64
called by 1: main calls 2: emitPmZemitR
353func emitBrow(b: *u8, pos: *i64, st: *i64, sexf: i64, sty: i64, ex: i64, faceZ: i64, mat: i64) -> i64
calls 2: emitPmemitR
367func emitEar(b: *u8, pos: *i64, st: *i64, sty: i64, ex: i64, ez: i64, mat: i64) -> i64
calls 2: emitPmemitR
378func emitEye(b: *u8, pos: *i64, st: *i64, ey: i64, ex: i64, ez: i64, r: i64, mat: i64) -> i64
called by 1: main calls 2: emitPmemitR
387func emitF(b: *u8, pos: *i64, part: i64, y: i64, yw: i64, th: i64, tw: i64, amp: i64) -> i64
called by 1: main calls 1: wint
404func bp_skel_load(path: *u8, J: *i64, stature: i64) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
456func main(argc: i64, argv: *i64) -> i64