code wiki / (root) / nx_follicle_lib.nx

nx_follicle_lib.nx

buildroot/runtime/nx_follicle_lib.nx

7779 B141 linesdepth 3pulls 5 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_follicle_lib.nx -- A PORE THAT GROWS: FOLLICLE STATE AND WHAT IT LOOKS LIKE (2026-09-03) THE OPERATOR'S LAW (2026-09-03): "a pore should grow waxed, shaved, different length of hair and have it sit with the other". A pore is not a dot on a texture. It is the opening of a canal that is either FULL or EMPTY, holding a shaft of some diameter, cut either bluntly or not at all, at some point in a regrowth cycle -- and the reason waxed skin, shaved skin and natural skin look different is that those are three different STATES of the same organ, not three different paintings. WHY THIS EXISTS, MEASURED: nx_microscan_lib.nx:217 records that "consulting the pore layer scores AT CHANCE, and no amount of follicle count changes that". That is the correct verdict on a pore layer that carries only a position. A pore with no state has nothing to say, so counting more of them cannot help. This file gives the pore the state, so the layer has something to be right about. TWO DISCRIMINATORS, BECAUSE THERE ARE TWO DIFFERENT COMPARISONS AND ONE NUMBER CANNOT SERVE BOTH: fo_ostium -- how dark the CANAL reads through the opening. Depends on whether a shaft is in there at all, and how thick it is. THIS is what separates SHAVED (canal full, dark dot, the five-o-clock shadow) from WAXED (canal empty, no dot). Shaving cuts the shaft; waxing pulls it from the root, and the visible difference is occupancy. fo_tip_salience -- how strongly the PROTRUDING tip reads above the surface. Depends on length, diameter and whether the tip is a blunt cross-section or a natural taper. THIS is what separates STUBBLE from short natural hair at the same length: a cut end is a flat face that catches light, an uncut tip narrows to nothing and nearly disappears. AND THE THIRD OUTPUT TIES IT TO THE SHIPPED STACK: fo_erythema returns the transient haemoglobin bump after removal, which feeds nx_kubelka_lib's mix term exactly as nx_vasc_lib's field does. Freshly waxed skin is red because of perfusion, and it fades -- a trajectory, not a decal. REGISTRATION IS NOT DONE HERE, DELIBERATELY. Whether a follicle sits at a pore centre and agrees with its neighbours is a two-layer registration question that nx_microscan already owns and already places through the generator's own centre function. Re-solving it here would be a second ruler. PROVEN 12/12 GREEN 2026-09-03: shaved ostium 3599 against waxed 0, blunt tip 17999 against tapered 4499, regrowth d0 empty -> d3 refilled, and the post-wax flush moving rendered R-G from 272337 to 97278. license_tier: ORIGINAL No hw writes (Rule 26). LIB (no main).

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_fixq30_lib.nx nx_follicle_lib.nx nx_follicle_gate.nx

imports: nx_syscalls.nxnx_fixq30_lib.nx

imported by: nx_follicle_gate.nx

structs

none

consts

38const FO_REFUSED: i64 = 0 - 1
40const FO_EMPTY: i64 = 0
41const FO_FULL: i64 = 1
43const FO_TAPERED: i64 = 0
44const FO_BLUNT: i64 = 1
47const FO_TAPER_NUM: i64 = 1
48const FO_TAPER_DEN: i64 = 4
49const FO_CH: i64 = 3
50const FO_TWO: i64 = 2
51const FO_R: i64 = 0
52const FO_G: i64 = 1
53const FO_B: i64 = 2

functions

57func fo_ostium(occ: i64, diam: i64) -> i64
called by 1: main calls 1: fq_mul
68func fo_tip_salience(occ: i64, diam: i64, len: i64, tip: i64) -> i64
called by 1: main calls 1: fq_mul
80func fo_regrow_len(days: i64, rate: i64) -> i64
called by 1: main
88func fo_occ_after_wax(days: i64, rate: i64) -> i64
called by 1: main
111func fo_ostium_chroma(fq: *i64, occ: i64, diam: i64, depth: i64, kshaft3: *i64, atten3: *i64, out3: *i64) -> i64
called by 1: main calls 2: fq_mulfq_exp
135func fo_erythema(fq: *i64, days: i64, peak: i64, tau: i64) -> i64
called by 1: main calls 4: fq_divfq_from_intfq_mulfq_exp