nx_bodyatlas.nx
buildroot/runtime/nx_bodyatlas.nx
about
nx_bodyatlas.nx -- ★HOLISTIC ANATOMICAL BEING (operator 2026-07-10, ref zygotebody.com + sloyd.ai/3d-human-model-generator):
"we are doing humans... generate holistic beings with parts". A whole-body human generated procedurally with ALL of its
anatomical SYSTEMS present as independently peelable layers -- exactly ZygoteBody's peel-a-layer atlas, and Sloyd's
parametric body generator, but 100% integer + sovereign (own SDF + integer ortho ray-march, no ML/Blender/externals).
8 SYSTEMS (bit in the visibility mask): 0 SKIN 1 MUSCLE 2 SKELETON 3 DIGESTIVE 4 CIRCULATORY 5 RESPIRATORY
6 URINARY 7 NERVOUS
~77 parts / ~60 NAMED structures head-to-toe (skull..foot; heart,lungs,liver,kidneys,brain,spinal cord,...).
PARAMETRIC (Sloyd-style): height / girth / frame-width / sex presets reshape the whole being from one seed.
PEEL (ZygoteBody-style): render with any subset of systems visible -> strip skin to see muscle, strip muscle to
see skeleton + viscera, isolate one system. Each part carries a system id + a name id -> the atlas can name parts.
This extends the layered idea in nx_anatstack (bone->muscle->fat->skin peel) from the FACE to the WHOLE BEING and
from tissue layers to full anatomical SYSTEMS. license_tier: ORIGINAL
dependencies 2 imports · 23 importers
diagram shows first 10 each side; +0 more imports, +13 more importers in the complete lists below.
imports: nx_syscalls.nxnx_itrig.nx
imported by: nx_anat_consistency_gate.nxnx_anthro_gate.nxnx_authorgen_gate.nxnx_being_showcase.nxnx_biotwin_morpho.nxnx_bodyatlas_explorer.nxnx_bodyatlas_gate.nxnx_bodyatlas_mesh_gate.nxnx_digitalhuman_census_gate.nxnx_engine_lod_gate.nxnx_engine_scene_gate.nxnx_footplant_gate.nxnx_genome.nxnx_gltf_anim_gate.nxnx_gltf_mesh_gate.nxnx_gltf_scene_gate.nxnx_hands_gate.nxnx_isosurf_gate.nxnx_phong_gate.nxnx_retarget_emit.nxnx_retarget_showcase.nxnx_sqprim_gate.nxnx_texture_gate.nx
structs
| none |
consts
| 15 | const BS_MAGIC_1024: i64 = 1024 |
| 16 | const BS_MAGIC_4096: i64 = 4096 |
| 17 | const BS_MAGIC_1000000000: i64 = 1000000000 |
| 18 | const BS_MAGIC_999999999: i64 = 999999999 |
| 19 | const BS_MAGIC_1500: i64 = 1500 |
| 20 | const BS_MAGIC_5800: i64 = 5800 |
| 21 | const BS_MAGIC_6000: i64 = 6000 |
| 22 | const BS_MAGIC_8600: i64 = 8600 |
| 23 | const BS_MAGIC_1600: i64 = 1600 |
| 24 | const BS_MAGIC_1360: i64 = 1360 |
| 25 | const BS_MAGIC_1090: i64 = 1090 |
| 26 | const BS_MAGIC_1078: i64 = 1078 |
| 27 | const BS_MAGIC_65536: i64 = 65536 |
| 28 | const BS_MAGIC_3072: i64 = 3072 |
| 29 | const BS_MAGIC_1000000: i64 = 1000000 |
| 30 | const BS_MAGIC_1400: i64 = 1400 |
| 31 | const BS_MAGIC_2600: i64 = 2600 |
| 32 | const BS_MAGIC_3200: i64 = 3200 |
| 33 | const BS_MAGIC_2120: i64 = 2120 |
| 34 | const BS_MAGIC_1780: i64 = 1780 |
| 37 | const BS_SKIN: i64 = 0 |
| 38 | const BS_MUS: i64 = 1 |
| 39 | const BS_SKEL: i64 = 2 |
| 40 | const BS_DIG: i64 = 3 |
| 41 | const BS_CIRC: i64 = 4 |
| 42 | const BS_RESP: i64 = 5 |
| 43 | const BS_URI: i64 = 6 |
| 44 | const BS_NERV: i64 = 7 |
| 45 | const BS_NSYS: i64 = 8 |
| 47 | const BA_STRIDE: i64 = 13 // per-part: sys, cx,cy,cz, rx,ry,rz, col, nid, rmax, b1, b2 (FK bone ids, 0=none) |
| 48 | const BA_CAP: i64 = 160 |
| 60 | const BA_NB: i64 = 11 |
| 84 | const BA_ANCH_SH: i64 = 520 // shoulder pivot y |
| 85 | const BA_ANCH_HIP: i64 = 40 // hip pivot y is -40 |
| 86 | const BA_ANCH_KNEE: i64 = 430 // knee pivot y is -430 |
| 87 | const BA_ANCH_ANKLE: i64 = 830 // ankle pivot y is -830 (tibia bottom -828 / foot top -824): the calf landmark |
| 608 | const BA_SMK: i64 = 34 // ★de-clay (operator: 'clay monsters'): smooth-union radius for SKIN parts |
| 661 | const BA_ZMAX: i64 = 560 |
functions
| 66 | func ba_isqrt(v: i64) -> i64 { if v <= 0 { return 0 } var x: i64 = v; var y: i64 = (x+1)/2; while y < x { x=y; y=(x+v/x)/2 } return x } |
| 67 | func ba_iabs(v: i64) -> i64 { if v < 0 { return 0-v } return v } |
| 68 | func ba_min(a: i64, b: i64) -> i64 { if a < b { return a } return b } called by 1: ba_part_sdf |
| 69 | func ba_max(a: i64, b: i64) -> i64 { if a > b { return a } return b } |
| 70 | func ba_clamp(v: i64, lo: i64, hi: i64) -> i64 { if v<lo {return lo} if v>hi {return hi} return v } |
| 88 | func ba_ax_defaults() -> i64 |
| 96 | func ba_set_axes(shw: i64, hipw: i64, arm: i64, thigh: i64, calf: i64) -> i64 |
| 100 | func ba_is_arm(nid: i64) -> i64 |
| 108 | func ba_is_leg(nid: i64) -> i64 called by 1: ba_axis_x |
| 115 | func ba_knee_y() -> i64 |
| 119 | func ba_axis_x(nid: i64, cx: i64) -> i64 |
| 125 | func ba_axis_y(nid: i64, cy: i64) -> i64 |
| 134 | func ba_add(sys: i64, cx: i64, cy: i64, cz: i64, rx: i64, ry: i64, rz: i64, col: i64, nid: i64) -> i64 |
| 153 | func ba_nin(nid: i64, a: i64, b: i64, c: i64, d: i64) -> i64 { if nid==a {return 1} if nid==b {return 1} if nid==c {return 1} if nid==d {return 1} return 0 } called by 1: ba_rig_setup |
| 157 | func ba_rig_setup() -> i64 |
| 240 | func ba_fwd_fk(py: i64, pz: i64, b1: i64, b2: i64, out: *i64) -> i64 called by 1: atlas_sync_pose |
| 266 | func atlas_sync_pose() -> i64 |
| 297 | func atlas_custom_reset() -> i64 { BA_N = 0; BA_TALL = BS_MAGIC_1024; BA_GIRTH = BS_MAGIC_1024; BA_WIDE = BS_MAGIC_1024; BA_SEX = 0; ba_set_axes(BS_MAGIC_1024, BS_MAGIC_1024, BS_MAGIC_1024, BS_MAGIC_1024, BS_MAGIC_1024); return 0 } |
| 298 | func atlas_custom_finish() -> i64 |
| 309 | func atlas_part_count() -> i64 { return BA_N } |
| 310 | func atlas_part_sys(k: i64) -> i64 { let B: *i64 = BA_BOX as *i64; return B[k*BA_STRIDE] } |
| 311 | func atlas_set_plant(v: i64) -> i64 { BA_PLANT = v; atlas_sync_pose(); return 0 } |
| 312 | func atlas_ground_off() -> i64 { return BA_GY } called by 1: main |
| 314 | func atlas_pose(preset: i64) -> i64 |
| 339 | func atlas_build(preset: i64) -> i64 called by 22: mainmainmainbm_measuremainmain+16 calls 5: ba_addit_sin4096it_cos4096ba_rig_setupatlas_sync_pose |
| 526 | func atlas_hand_curl(v: i64) -> i64 { BA_CURL = v; return 0 } |
| 531 | func ba_piv_ready() -> i64 { if BA_PIV == 0 { return 0 } return 1 } called by 1: ga_piv |
| 532 | func ba_piv(j: i64, axis: i64) -> i64 called by 1: ga_piv |
| 538 | func ba_n() -> i64 { return BA_N } |
| 540 | func ba_named_count() -> i64 |
| 555 | func ba_systems_present() -> i64 |
| 568 | func ba_sys_part_count(sys: i64) -> i64 called by 1: main |
| 575 | func ba_part_color(k: i64) -> i64 { let B: *i64 = BA_BOX as *i64; return B[k*BA_STRIDE+7] } |
| 577 | func ba_part_bone(k: i64) -> i64 { let B: *i64 = BA_BOX as *i64; let b2: i64 = B[k*BA_STRIDE+12]; if b2 != 0 { return b2 } return B[k*BA_STRIDE+11] } |
| 580 | func ba_part_sdf(k: i64, x: i64, y: i64, z: i64) -> i64 |
| 609 | func ba_smin(a: i64, b: i64) -> i64 called by 1: ba_sdf |
| 618 | func ba_sdf(x: i64, y: i64, z: i64, mask: i64) -> i64 |
| 643 | func ba_nearest(x: i64, y: i64, z: i64, mask: i64) -> i64 |
| 662 | func atlas_render(fb: *i64, W: i64, H: i64, yaw: i64, mask: i64, hi_sys: i64) -> i64 |