code wiki / (root) / nx_arousal_render.nx

nx_arousal_render.nx

buildroot/runtime/nx_arousal_render.nx

15855 B358 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind tooltopic arousal
docsdependenciesstructsconstsfunctions

about

nx_arousal_render.nx -- the LOOK organ. Emits a PNG of arousal SHIFTING OVER TIME. x = TIME (0..900s, spanning the published 664-743s time-to-peak). y = stacked site bands in real Beer-Lambert colour, then a morphology strip, then the drive track itself. ★TIME-VARYING DRIVE: with a track file the drive is NOT a step input. Real arousal rises, collapses on interruption, and recovers -- that is the whole clinical picture in the dual-control model (SIS1 performance-failure / SIS2 consequence threat suppressing SES excitation). An inhibition event visibly extinguishes the flush and reshapes the morphology, which is the view a sex-therapy user would actually be shown. ★CORRECTNESS: this integrates ONCE forward with a per-step drive lookup. Calling a_perf(t,...) per column re-integrates from zero assuming CONSTANT drive -- correct for a step, WRONG for a track. usage: nx_arousal_render <out.png> <sex0m1f> <drive_permil> <melanin_permil> [propensity] [track] track file = "t_ms drive_permil" lines, ascending; drive is piecewise-constant. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_arousal_skin_lib.nx nx_doc_layout.nx nx_png_write.nx nx_arousal_render.nx

imports: nx_arousal_skin_lib.nxnx_doc_layout.nxnx_png_write.nx

imported by: nobody (leaf or entry point)

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

main a_atoi sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close a_conf a_slen a_atoi ↻ a_skipnd a_pint a_lag sk_eval sk_clamp sk_site_gain a_flush sk_thresh sk_refl sk_clamp ↻ a_exp_neg a_exp_frac a_nipple_apparent a_areola_engorge r_px a_rigidity_tip a_rigidity font8x8_table sys_mmap ↻ fg r_text r_char nx_doc_glyph r_px ↻ sk_name r_num r_char ↻ nx_png_write_rgb sys_openat_wr

structs

none

consts

21const R_MAGIC_15000: i64 = 15000
22const R_MAGIC_185000: i64 = 185000
23const R_MAGIC_210000: i64 = 210000
25const R_W: i64 = 860
26const R_GUT: i64 = 120
27const R_PW: i64 = 740
28const R_HEAD: i64 = 30
29const R_BAND: i64 = 40
30const R_MORPH: i64 = 60
31const R_TRACK: i64 = 40
32const R_GEN: i64 = 40
33const R_AXIS: i64 = 24
34const R_SPAN_MS: i64 = 900000
35const R_TAU_NIP: i64 = 6000
36const R_MAXPT: i64 = 512

functions

38func r_px(img: *u8, x: i64, y: i64, r: i64, g: i64, b: i64) -> i64
called by 2: r_charmain
49func r_char(img: *u8, tbl: *u8, x: i64, y: i64, ch: i64, cr: i64, cg: i64, cb: i64) -> i64
called by 2: r_textr_num calls 2: nx_doc_glyphr_px
63func r_text(img: *u8, tbl: *u8, x: i64, y: i64, s: *u8, cr: i64, cg: i64, cb: i64) -> i64
called by 1: main calls 1: r_char
72func r_num(img: *u8, tbl: *u8, x: i64, y: i64, v: i64, cr: i64, cg: i64, cb: i64) -> i64
called by 1: main calls 1: r_char
88func main(argc: i64, argv: *i64) -> i64