code wiki / _hdl_build / nx_skullgen.nx
nx_skullgen.nx
buildroot/runtime/_hdl_build/nx_skullgen.nx
about
nx_skullgen.nx -- F1108/seq900 KEYSTONE: THE SKULL, GENERATED. Inside-out, from the first byte up.
OPERATOR, and he was right: "you arent building from the inside out aka a skull to give it structure ...
take the skull and bones those should have all been generatable by now then you just layer on top."
Every facial feature this program fought with is a property of BONE -- the brow ridge is the supraorbital
margin of the frontal bone, the chin is the mental protuberance of the mandible, the cheekbones are the
zygomatic arches, the eye sockets are the orbits. We had been sticking those onto a smooth SKIN ovoid,
which is why three tuned chin attempts all rendered as lobes stacked under a mouth: pieces stuck on a
blob look like pieces stuck on a blob. The structure has to exist first and the surface layers onto it.
This organ does NOT store a skull -- it stores the RULES that make one, and emits them as a canon of
P/R/F rows that the proven emitter turns into geometry. So the skull inherits spline lofting, true
central-difference normals, capped tubes, per-part placement and rotation about Z for free, and it is
data generated by anatomy rather than a modelled asset. The oracle it is scored against is the
BodyParts3D skull (171,248 real scanned triangles, CC BY-SA 2.1 Japan) -- a RULER, never the product.
nx_skullgen <out.dat> [sex 0-1000] [seed] [robust 0-1000]
nx_skullgen selftest
license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).
dependencies 2 imports · 0 importers
imports: nx_gate_verdict.nxnx_itoa_lib.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
| 23 | const SK_BUF: i64 = 65536 |
| 24 | const SK_MODE: i64 = 420 |
| 25 | const SK_MINP: i64 = 7 |
| 26 | const SK_MINR: i64 = 30 |
| 292 | const SK_VAULT_FLOOR: i64 = 40 // braincase confined to the upper 60 percent of skull height (seq908) |
functions
| 33 | func sk_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 |
| 38 | func sk_pn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 39 | func sk_step(st: *i64) -> i64 called by 1: sk_pm |
| 46 | func sk_pm(st: *i64, amp: i64) -> i64 { if amp <= 0 { return 0 } let r: i64 = sk_step(st) % (2*amp+1); return r - amp } |
| 47 | func sk_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 52 | func sk_atoi(s: *u8) -> i64 called by 1: main |
| 58 | func sk_wint(b: *u8, pos: *i64, v: i64, c: i64) -> i64 |
| 70 | func skR(b: *u8, pos: *i64, y: i64, xoff: i64, zoff: i64, ra: i64, rb: i64) -> i64 |
| 79 | func skP(b: *u8, pos: *i64, mir: i64, rot: i64, ox: i64, oy: i64, oz: i64, mat: i64, rotz: i64) -> i64 |
| 86 | func skF(b: *u8, pos: *i64, part: i64, y: i64, yw: i64, th: i64, tw: i64, amp: i64) -> i64 |
| 94 | func skO(b: *u8, pos: *i64, part: i64, y: i64, yw: i64, th: i64, tw: i64) -> i64 |
| 103 | func sk_emit(b: *u8, pos: *i64, st: *i64, sexf: i64, robust: i64, noise: i64) -> i64 |
| 239 | func sk_write(path: *u8, sexf: i64, seed: i64, robust: i64, noise: i64) -> i64 |
| 253 | func sk_count(path: *u8, ch: i64) -> i64 |
| 293 | func sk_tokn(d: *u8, n: i64, p: *i64, out: *i64) -> i64 called by 1: sk_ycheck |
| 319 | func sk_ycheck(path: *u8, out: *i64) -> i64 |
| 381 | func sk_gate() -> i64 |
| 454 | func main(argc: i64, argv: *i64) -> i64 |