code wiki / (root) / nx_arousal_body.nx

nx_arousal_body.nx

buildroot/runtime/nx_arousal_body.nx

21113 B441 linesdepth 6pulls 15 transitivereach 0 importersview sourcekind tooltopic arousal
docsdependenciesstructsconstsfunctions

about

nx_arousal_body.nx -- arousal progression ON THE BODY, not on a chart. Sphere-traces the sovereign SDF humanoid (nx_sdfrender's 18-ellipsoid form, feminine morph from nx_body_figure) as an orthographic FRONT view, maps every surface hit to an anatomical site by its world position, and shades it with the real Beer-Lambert skin optics at that site's perfusion. Emits a FILMSTRIP: the same body at N times, so flush PROPAGATION is visible as it spreads. Bands and ticks are an abstraction of the physiology. This is the physiology on a body. ★Front is -z in this rig (breasts and face both sit at -z), so the camera looks along +z. ★SITE MAP is by world (x,y) against the rig's own part centres: head/neck y>980, arms |x|>380, legs y<-150, breast y>700, sub-mammary y>560, torso y>200, else pelvic/genital. usage: nx_arousal_body <out.png> <sex0m1f> <drive_permil> <melanin_permil> [propensity] [track] license_tier: ORIGINAL expect_exit: 0

dependencies 5 imports · 0 importers

nx_arousal_skin_lib.nx nx_body_figure.nx nx_jpeg_decoder.nx nx_doc_layout.nx nx_png_write.nx nx_arousal_body.nx

imports: nx_arousal_skin_lib.nxnx_body_figure.nxnx_jpeg_decoder.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 nx_jpeg_decode sys_mmap ↻ _jpg_read_u16_be _jpg_zigzag nx_huffman_build sys_mmap ↻ _jpg_destuff_entropy nx_bitstream_alloc sys_mmap ↻ nx_dct8_init _jpg_decode_block nx_huffman_decode_msb nx_bitstream_read_msb nx_bitstream_bits_remainin _bs_peek_byte nx_bitstream_read_msb ↻ _jpg_extend _jpg_zigzag ↻ nx_dct8_inverse_2d nx_dct8_inverse_1d _jpg_clamp_u8 _jpg_ycbcr_to_rgb _jpg_clamp_u8 ↻ sdf_bytes sdf_person_full sdf_body

structs

none

consts

22const AB_FRAMES: i64 = 6
23const AB_FW: i64 = 190
24const AB_FH: i64 = 330
25const AB_HEAD: i64 = 30
26const AB_FOOT: i64 = 22
27const AB_SPAN_MS: i64 = 900000
28const AB_TAU_NIP: i64 = 6000
29const AB_MAXPT: i64 = 512
30const AB_W: i64 = 1140

functions

32func ab_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 2: ab_sitemain
33func ab_px(img: *u8, x: i64, y: i64, r: i64, g: i64, b: i64) -> i64
called by 2: ab_charmain
42func ab_char(img: *u8, tbl: *u8, x: i64, y: i64, ch: i64, cr: i64, cg: i64, cb: i64) -> i64
called by 2: ab_textab_num calls 2: nx_doc_glyphab_px
56func ab_text(img: *u8, tbl: *u8, x: i64, y: i64, s: *u8, cr: i64, cg: i64, cb: i64) -> i64
called by 1: main calls 1: ab_char
61func ab_num(img: *u8, tbl: *u8, x: i64, y: i64, v: i64, cr: i64, cg: i64, cb: i64) -> i64
called by 1: main calls 1: ab_char
80func ab_isqrt(v: i64) -> i64 { if v <= 0 { return 0 } var x: i64 = v; var y: i64 = (x + 1) / 2; while y < x { x = y; y = (x + v / x) / 2 } return x }
called by 1: main
83func ab_hash(x: i64, y: i64, z: i64) -> i64
called by 1: main
92func ab_wrap(ndl: i64, wrapw: i64) -> i64
called by 1: main
100func ab_spec(ndh: i64, ndv: i64, shin: i64) -> i64
called by 1: main
114func ab_ao(base: i64, px: i64, py: i64, pz: i64, nx1: i64, ny1: i64, nz1: i64) -> i64
called by 1: main calls 1: sdf_eval
147func ab_tex(tex: *u8, tw: i64, th: i64, wx: i64, wy: i64, ch: i64) -> i64
called by 1: main
159func ab_site(wx: i64, wy: i64) -> i64
called by 1: main calls 1: ab_abs
170func main(argc: i64, argv: *i64) -> i64