code wiki / (root) / nx_figuregen.nx

nx_figuregen.nx

buildroot/runtime/nx_figuregen.nx

7824 B120 linesdepth 3pulls 4 transitivereach 3 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_figuregen.nx -- ★SOVEREIGN INFINIGEN: a full-body HUMAN FIGURE via the SAME layered anatomy (nx_anatstack: skeleton->muscle->skin), a BIPED body plan (head, neck, chest, abdomen, pelvis, 2 arms, 2 legs + muscles). Seeded proportions (height, build) + skin tone -> varied standing people to place in the world. Renders via the shared anatstack ray-marcher. No ML, no assets. license_tier: ORIGINAL

dependencies 1 imports · 3 importers

nx_anatstack.nx nx_figuregen.nx nx_gt_annotations_gate.nx nx_livingworld_gate.nx nx_skinneural_gate.nx

imports: nx_anatstack.nx

imported by: nx_gt_annotations_gate.nxnx_livingworld_gate.nxnx_skinneural_gate.nx

structs

none

consts

6const FG_MAGIC_6364136223846793005: i64 = 6364136223846793005
7const FG_MAGIC_1442695040888963407: i64 = 1442695040888963407
8const FG_MAGIC_2147483647: i64 = 2147483647
9const FG_MAGIC_2654435761: i64 = 2654435761
10const FG_MAGIC_1013904223: i64 = 1013904223
11const FG_MAGIC_1280: i64 = 1280
12const FG_MAGIC_1480: i64 = 1480
13const FG_MAGIC_65536: i64 = 65536
28const FG_WORLDH: i64 = 1400 // nominal figure height (for scene-scale)

functions

15func fg_next(st: *i64) -> i64 { var h: i64=st[0]; h=h*FG_MAGIC_6364136223846793005+FG_MAGIC_1442695040888963407; st[0]=h; return (h>>33)&FG_MAGIC_2147483647 }
16func fg_range(st: *i64, lo: i64, hi: i64) -> i64 { return lo + fg_next(st) % (hi-lo+1) }
called by 1: figuregen_build calls 1: fg_next
17func fg_clamp(v: i64, lo: i64, hi: i64) -> i64 { if v<lo {return lo} if v>hi {return hi} return v }
called by 1: figuregen_build
20func fg_limb(P: *i64, i: i64, ax: i64, ay: i64, az: i64, bx: i64, by: i64, bz: i64, cx: i64, cy: i64, cz: i64, r: i64, er: i64) -> i64
called by 1: figuregen_build calls 2: as_capsas_ellip
30func figuregen_build(P: *i64, seed: i64, skinout: *i64) -> i64