code wiki / (root) / nx_anatomy_placement.nx

nx_anatomy_placement.nx

buildroot/runtime/nx_anatomy_placement.nx

6895 B147 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic anatomy
docsdependenciesstructsconstsfunctions

about

nx_anatomy_placement.nx -- out-of-place anatomy verification. Image #56 failure class: nipple rendered at a location that doesn't match where the breast tissue actually projects. The nipple has to be ON the breast mound, near the projection peak, slightly above midline horizontally. Same problem for areola-on-nipple, navel-on- torso-midline, pubic-mound-on-pelvis, etc. The substrate measures the DISTANCE between an anatomical feature's observed centroid and its CANONICAL ZONE (computed from the parent region's bbox + canon ratios). Outside the zone = OUT_OF_PLACE. Canon zones (per Loomis figure-drawing canon): nipple on breast: centered horizontally on breast, vertically at 0.55-0.70 of breast height from top areola on nipple: concentric with nipple centroid navel on torso: horizontal midline, vertical 0.50-0.60 from top of torso pubic mound: horizontal midline, vertical 0.85-0.95 from top of torso Sealed verdict ladder: OUT_OF_PLACE distance > 50% of parent dimension SLIGHTLY_OFF 25-50% CORRECT < 25% from expected zone

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_anatomy_placement.nx nx_anatomy_placement_test.nx

imports: nx_syscalls.nx

imported by: nx_anatomy_placement_test.nx

structs

none

consts

32const NX_MAGIC_1024: i64 = 1024
34const NX_PLACE_RES_DIST_X_Q10: i64 = 0 // horizontal off-target Q10 (1024 = parent width)
35const NX_PLACE_RES_DIST_Y_Q10: i64 = 1
36const NX_PLACE_RES_DIST_TOTAL_Q10: i64 = 2 // euclidean approx (max(dx, dy))
37const NX_PLACE_RES_VERDICT: i64 = 3
38const NX_PLACE_RES_FIELDS: i64 = 4
40const NX_PLACE_OUT_OF_PLACE: i64 = 0
41const NX_PLACE_SLIGHTLY_OFF: i64 = 1
42const NX_PLACE_CORRECT: i64 = 2
45const NX_PLACE_NIPPLE_X_CENTER: i64 = 512 // 0.50 = horizontal center
46const NX_PLACE_NIPPLE_X_TOL: i64 = 102 // ±10% horizontally
47const NX_PLACE_NIPPLE_Y_MIN: i64 = 563 // 0.55 from top
48const NX_PLACE_NIPPLE_Y_MAX: i64 = 717 // 0.70 from top
50const NX_PLACE_NAVEL_X_CENTER: i64 = 512
51const NX_PLACE_NAVEL_X_TOL: i64 = 51 // ±5% horizontally (tighter)
52const NX_PLACE_NAVEL_Y_MIN: i64 = 512
53const NX_PLACE_NAVEL_Y_MAX: i64 = 614
55const NX_PLACE_PUBIC_X_CENTER: i64 = 512
56const NX_PLACE_PUBIC_X_TOL: i64 = 51
57const NX_PLACE_PUBIC_Y_MIN: i64 = 870
58const NX_PLACE_PUBIC_Y_MAX: i64 = 973

functions

68func nx_anatomy_placement_score(parent_x0: i64, parent_y0: i64,
114func nx_nipple_on_breast_check(breast_x0: i64, breast_y0: i64,
called by 1: main calls 1: nx_anatomy_placement_score
126func nx_navel_on_torso_check(torso_x0: i64, torso_y0: i64,
called by 1: main calls 1: nx_anatomy_placement_score
138func nx_pubic_on_torso_check(torso_x0: i64, torso_y0: i64,
called by 1: main calls 1: nx_anatomy_placement_score