nx_perineum_distance.nx
buildroot/runtime/nx_perineum_distance.nx
about
nx_perineum_distance.nx -- fourchette → anal verge distance + canon check.
Given the vulva fourchette point (bottom of labia majora cleft) and
the anal verge point, measure the perineum length in pixels and
score against the canon range (≈ 0.3-0.5 × face_width for adult
female). Too short or too long flags an anatomical anomaly.
Math:
perineum_px = |fourchette_y - anal_y| (vertical distance — works for
presenting or laying-back poses where the line is vertical)
perineum_ratio_q10 = perineum_px * 1024 / face_width_px
target = NX_R_PERINEUM_FACE_W (0.4 Q10 = 410)
Output flat-array:
result[0] = perineum_px
result[1] = perineum_ratio_q10
result[2] = ratio_score_q10 (1024 in canon range, 0 far out)
result[3] = verdict (0=TOO_SHORT, 1=AMBIGUOUS, 2=IN_CANON, 3=TOO_LONG)
dependencies 3 imports · 1 importers
imports: nx_syscalls.nxnx_phi.nxnx_canon_proportions.nx
imported by: nx_lower_anatomy_test.nx
structs
| none |
consts
| 29 | const NX_MAGIC_1024: i64 = 1024 |
| 31 | const NX_PERIN_RES_PX: i64 = 0 |
| 32 | const NX_PERIN_RES_RATIO_Q10: i64 = 1 |
| 33 | const NX_PERIN_RES_SCORE_Q10: i64 = 2 |
| 34 | const NX_PERIN_RES_VERDICT: i64 = 3 |
| 35 | const NX_PERIN_RES_FIELDS: i64 = 4 |
| 37 | const NX_PERIN_V_TOO_SHORT: i64 = 0 |
| 38 | const NX_PERIN_V_AMBIGUOUS: i64 = 1 |
| 39 | const NX_PERIN_V_IN_CANON: i64 = 2 |
| 40 | const NX_PERIN_V_TOO_LONG: i64 = 3 |
| 43 | const NX_PERIN_TARGET_MIN: i64 = 256 // 0.25 Q10 |
| 44 | const NX_PERIN_TARGET_MAX: i64 = 614 // 0.60 Q10 |
| 45 | const NX_PERIN_AMBIG_SPREAD: i64 = 100 // 0.10 Q10 outside band = ambiguous |
functions
| 47 | func nx_perineum_distance(fourchette_y: i64, anal_y: i64, |