code wiki / _hdl_build / nx_curviness_gate.nx
nx_curviness_gate.nx
buildroot/runtime/_hdl_build/nx_curviness_gate.nx
about
nx_curviness_gate.nx -- GATE for aesthetictwin rung AT2 (outline curviness), the measure the
published evidence prefers to the waist-to-hip ratio.
THE DONE-RULE THIS GATE ANSWERS WAS WRITTEN INTO aesthetictwin.plan BEFORE ANY CODE, and it asks
for exactly three things: that the metric ORDERS two silhouettes of equal waist-to-hip ratio and
different curviness, that it is INVARIANT UNDER UNIFORM SCALE, and that a straight-sided silhouette
reads zero. T4, T5 and T6 are those three. They are not paraphrased here from the implementation --
the implementation was corrected to meet them, because a first draft returned a per-row density that
RISES when a body is merely smaller, and the pre-declared invariance requirement is what caught it.
THE LOAD-BEARING TOOTH IS T4 AND T3 IS WHAT MAKES IT LOAD-BEARING. The gentle and sharp bodies are
built with the SAME height, the SAME waist and the SAME hip -- so an identical waist-to-hip ratio,
which T3 proves by measuring it with this organ's own narrowest and widest primitives. They differ
only in WHERE the taper happens: the gentle body sweeps from hip to waist over its whole height, the
sharp body pinches in over the middle half and runs straight above and below. A measure that is a
ratio in disguise CANNOT separate them, because every input a ratio reads is identical.
EVERY FIXTURE IS ASSEMBLED AT RUNTIME AND IN MEMORY, so this gate can never share a fixture with a
production beat, and the widths are painted as an EXACT left-aligned run so the measured run length
IS the width with no centring round-off. That is not cosmetic: the signal here is a total second
difference of order 8 slope-units, and a plus-or-minus-one quantisation per row would swamp it.
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_gatekit_lib.nxnx_anatomy_measure.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
| 27 | const CG_ASCII0: i64 = 48 |
| 28 | const CG_MINUS: i64 = 45 |
| 29 | const CG_NL: i64 = 10 |
| 30 | const CG_INK: i64 = 255 |
| 31 | const CG_CANVAS_W: i64 = 420 |
| 32 | const CG_CANVAS_H: i64 = 120 |
| 33 | const CG_BODY_H: i64 = 100 |
| 34 | const CG_WAIST: i64 = 100 |
| 35 | const CG_HIP: i64 = 200 |
| 36 | const CG_SPAN_GENTLE: i64 = 50 |
| 37 | const CG_SPAN_SHARP: i64 = 25 |
| 38 | const CG_BIG_W: i64 = 520 |
| 39 | const CG_BIG_H: i64 = 220 |
| 40 | const CG_BIG_BODY_H: i64 = 200 |
| 41 | const CG_BIG_WAIST: i64 = 200 |
| 42 | const CG_BIG_HIP: i64 = 400 |
| 43 | const CG_BIG_SPAN: i64 = 100 |
| 44 | const CG_PAINT_X: i64 = 10 |
| 45 | const CG_SHIFT_X: i64 = 27 |
| 46 | const CG_RECT_W: i64 = 200 |
| 47 | const CG_RECT_H: i64 = 80 |
| 48 | const CG_RECT_BODY_H: i64 = 60 |
| 49 | const CG_RECT_WIDTH: i64 = 150 |
| 50 | const CG_SHORT_BAND: i64 = 3 |
| 51 | const CG_ORDER_MIN: i64 = 2 |
| 52 | const CG_TOL_DEN: i64 = 10 |
functions
| 54 | func cg_pnum(tag: *u8, v: i64) -> i64 |
| 82 | func cg_paint_body(img: *Image, bh: i64, waist: i64, hip: i64, span: i64, px: i64) -> i64 |
| 101 | func main(argc: i64, argv: *i64) -> i64 |