nx_twintruth_gate.nx
buildroot/runtime/nx_twintruth_gate.nx
about
nx_twintruth_gate.nx -- the referee for the eye unit's landmark truth in nx_twinfit_lib (aesthetictwin AT39, 2026-09-17; split
out of nx_twinfit_gate 2026-09-18). The projection is held to the renderer's own ray set-up; the canon face has truth on both
eyes, mirrored about the frame centre, tilted as the canon gene says and confirmed on the surface inside the corner window; the
eye genes leave the canon untouched, move the truth with the tilt gene and break the mirror with the difference gene; a face
without lid shells has no truth and says why by name; seed 42 keeps its identity and its eye genes; the judge scores a planted
ruler against planted truth. WHY A GATE OF ITS OWN: the truth scans march the surface at a fixed two-unit step because the
lid-shell field is steep and discontinuous at the canthus (a distance-stepped march could skip the thin lid), so these teeth
cost more than the rest of the twin loop together -- measured 13.3 s of a 22.8 s laptop run, 178 s on the NAS against the
roster's 180 s per-gate deadline. One subject per gate lets each fit the roster. AT44 (2026-09-18) adds the MOUTH's truth and
judge, which cost a few surface marches and no render (17 ms on the laptop): the lip judge exact on a planted case with a decoy
in the stated-ratio slot, and the canon face's five lip points in anatomical order, the stomion on the lip sweep's front (the seam
is seen at its opening, not its slit floor) and the vermilion lines on the marched surface. Values are printed with gv_kv.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_twinfit_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
| 18 | const TG_I64: i64 = 8 |
| 21 | const TG_G_W: i64 = 89 |
| 22 | const TG_G_C: i64 = 106 |
| 23 | const TG_SKIN_R: i64 = 130 |
| 24 | const TG_SKIN_G: i64 = 98 |
| 25 | const TG_SKIN_B: i64 = 70 |
| 27 | const TG39_CANON_PCT: i64 = 100 |
| 28 | const TG39_PAGE: i64 = 4096 |
| 29 | const TG39_PROJ_PX: i64 = 1000 // a planted model point right of and above the axis, at the origin plane |
| 30 | const TG39_PROJ_PY: i64 = 500 |
| 31 | const TG39_PROJ_X_DECI: i64 = 3985 // 10*HW + 10*FOCAL*1000/4096 - 5 = 2560 + 1430 - 5 |
| 32 | const TG39_PROJ_Y_DECI: i64 = 1200 // 10*HH - 10*FOCAL*500/4096 - 5 = 1920 - 715 - 5 |
| 33 | const TG39_BEHIND_Z: i64 = 0 - 5000 // behind a camera that stands 4096 in front of the origin |
| 34 | const TG39_TILT_TOL: i64 = 10 // one degree: the scan step and the perspective of a corner that sits back from the apex |
| 35 | const TG39_TILT_HIGH: i64 = 90 |
| 36 | const TG39_DTILT: i64 = 10 |
| 37 | const TG39_PRE_LID_PARTS: i64 = 27 |
| 38 | const TG39_SEED: i64 = 42 |
| 39 | const TG39_SEED_TILT: i64 = 97 // seed 42's eye genes as the stream draws them after the seven morphs and the tone |
| 40 | const TG39_SEED_OPEN: i64 = 104 |
| 41 | const TG39_SEED_WIDTH: i64 = 98 |
| 42 | const TG39_SEED_UPSHARE: i64 = 597 |
| 43 | const TG39_SEED_DTILT: i64 = 0 - 5 |
| 44 | const TG39_SEED_DOPEN: i64 = 0 - 4 |
| 46 | const TG39_J_EXO: i64 = 1500 |
| 48 | const TG39_J_T_RLAT_X: i64 = 1000 |
| 49 | const TG39_J_T_RMED_X: i64 = 1500 |
| 50 | const TG39_J_T_LMED_X: i64 = 2000 |
| 51 | const TG39_J_T_LLAT_X: i64 = 2500 |
| 52 | const TG39_J_T_ROW_Y: i64 = 1000 |
| 53 | const TG39_J_R_RLAT_X: i64 = 100 |
| 54 | const TG39_J_R_RMED_X: i64 = 153 |
| 55 | const TG39_J_R_LMED_X: i64 = 200 |
| 56 | const TG39_J_R_LLAT_X: i64 = 250 |
| 57 | const TG39_J_R_ROW_Y: i64 = 100 |
| 58 | const TG39_J_R_RMED_Y: i64 = 98 |
| 59 | const TG39_J_DX: i64 = 30 |
| 60 | const TG39_J_DY: i64 = 0 - 20 |
| 61 | const TG39_J_NME: i64 = 24 // isqrt(30*30 + 20*20) = 36 deci-px; 36 * 1000 / 1500 |
| 62 | const TG39_J_NMEAN: i64 = 6 // 24 / 4 |
| 67 | const TG44_T_MID_X: i64 = 1000 |
| 68 | const TG44_T_LS_Y: i64 = 900 |
| 69 | const TG44_T_STO_Y: i64 = 1000 |
| 70 | const TG44_T_LI_Y: i64 = 1150 |
| 71 | const TG44_T_CHR_X: i64 = 800 |
| 72 | const TG44_T_CHL_X: i64 = 1200 |
| 73 | const TG44_T_EXO: i64 = 1500 |
| 74 | const TG44_T_RATIO_PIXEL: i64 = 667 // (1000 - 900) over (1150 - 1000) |
| 75 | const TG44_DECOY: i64 = 9999 |
| 76 | const TG44_R_MID_X: i64 = 100 |
| 77 | const TG44_R_LS_Y: i64 = 90 |
| 78 | const TG44_R_STO_Y: i64 = 100 |
| 79 | const TG44_R_LI_Y: i64 = 118 |
| 80 | const TG44_R_CHR_X: i64 = 80 |
| 81 | const TG44_R_CHL_X: i64 = 124 |
| 82 | const TG44_R_LIP: i64 = 555 |
| 83 | const TG44_J_LI_DY: i64 = 30 // 118 px is 1180 deci against 1150 |
| 84 | const TG44_J_LI_NME: i64 = 20 // 30 * 1000 / 1500 |
| 85 | const TG44_J_CHL_DX: i64 = 40 |
| 86 | const TG44_J_CHL_NME: i64 = 26 // 40 * 1000 / 1500 |
| 87 | const TG44_J_NMEAN: i64 = 9 // (0 + 0 + 20 + 0 + 26) / 5 |
| 88 | const TG44_LI_SLOT: i64 = 2 // labrale inferius is the third landmark of the judge's record |
| 89 | const TG44_CHL_SLOT: i64 = 4 |
functions
| 90 | func tg44_judge(ctr: *i64, vals: *i64) -> i64 |
| 121 | func tg44_truth(ctr: *i64, vals: *i64) -> i64 |
| 146 | func tg39_canon_genes(g: *i64) -> i64 { var k: i64 = 0; while k < TW_GENES { g[k] = TG39_CANON_PCT; k = k + 1 } return 0 } called by 1: tg_at39 |
| 147 | func tg39_canon_eye(eg: *i64) -> i64 { var k: i64 = 0; while k < FA_EG_N { eg[k] = fa_eye_gene_canon(k); k = k + 1 } return 0 } |
| 148 | func tg_at39(ctr: *i64, vals: *i64) -> i64 called by 1: main calls 14: sys_mmapgv_check_eqtw_projecttg39_canon_genestw_buildtw_truth_landmarks+8 |
| 249 | func main(argc: i64, argv: *i64) -> i64 |