code wiki / (root) / nx_strand_groom_gate.nx

nx_strand_groom_gate.nx

buildroot/runtime/nx_strand_groom_gate.nx

7950 B154 linesdepth 5pulls 9 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_strand_groom_gate.nx -- PG14: DO GUIDE CURVES PLUS INTERPOLATION MAKE A GROOM, HIERARCHICAL BY CONSTRUCTION? SUBJECT: nx_hairdyn_lib.gr_strand (in-process). Every geometric claim is recomputed from the groom's own positions. The two load-bearing teeth are KATs on the interpolation: a child rooted ON a guide reproduces that guide exactly, and a child between guides lies inside the box its guides span (a convex combination cannot leave it). Fixtures are arithmetic; the gate leaks no filesystem state.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_hairdyn_lib.nx nx_strand_groom_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_hairdyn_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ gr_strand gr_alloc sys_mmap ↻ gr_err sys_write ↻ sys_mmap ↻ gr_scalp_root gr_range gr_rand sd_isqrt vm_isqrt gr_shape_guide gr_range ↻ gr_set gr_rootx gr_rooty gr_rootz gr_rand ↻ gr_child_at sys_mmap ↻

structs

none

consts

10const SG_SEED: i64 = 20260906
11const SG_CX: i64 = 0
12const SG_CY: i64 = 40000 // Q8: a head 156 units up
13const SG_CZ: i64 = 0
14const SG_R: i64 = 2560 // scalp radius 10 units
15const SG_NG: i64 = 12
16const SG_NC: i64 = 180
17const SG_NSEG: i64 = 16
18const SG_SEGLEN: i64 = 512 // 2 units per segment
19const SG_JIT: i64 = 150
20const SG_ROOT_TOL: i64 = 8 // Q8: the integer normalisation's own error on the scalp radius
21const SG_LEN_DEV_PERMIL: i64 = 150

functions

23func sg_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
25func main() -> i64