The 3D scene decides whether each photon absorbs or escapes from a pre-computed formula: N ≈ 1 + 6·aspect·fill bounces, then Anano = 1 − (1 − Aflat)N. This 2D build does not reuse that shortcut. It lays out an explicit periodic lattice of wire cross-sections — pitch s from the areal packing fraction, wire diameter fixed, height from the aspect ratio — and runs a real event-driven geometric-optics ray tracer: each photon travels in a straight line until it hits a wire's side wall, a wire's top face, or the solid base plate, and at every single collision the local incidence angle (measured from that surface's own normal, not the original beam angle) sets a fresh Kruer resonance-absorption probability. The photon is absorbed or specularly reflected according to that local probability, bounce after real bounce, until it is absorbed or finds a gap straight up to open sky.
Per-bounce absorption probability (Kruer resonance absorption,
applied locally at the true angle of each real collision):
τ_local = (k₀L)^(1/3)·sin θ_local , k₀ = 2π/λ
p_abs = 1.2 τ_local · exp(−2τ_local³/3)
θ_local measured against the hit surface's own normal:
vertical wire wall → sin θ_local = |v_y|
horizontal top/base → sin θ_local = |v_x|
Hot-electron scaling (Wilks, same as the 3D scene):
T_hot [MeV] = 0.511·(√(1 + I_abs·λ²/1.37) − 1)
Because this is a real Monte Carlo simulation rather than a formula lookup, the "Ray-trace A" readout is measured live from the actual fraction of traced photons that end up absorbed versus escaped — it is shown next to the 3D scene's analytic N-bounce prediction so you can see the two independent methods agree on the same physical trend (taller, denser wire forests trap and absorb more light) without being forced to match exactly; a standalone Node script in the repository verifies the ray tracer's flat-target limit reproduces the closed-form Kruer formula to Monte Carlo precision, that every traced photon is accounted for as either absorbed or escaped, and that measured absorption never dips below the bare-flat-target baseline.
- Mode buttons — nanowire mode runs the full lattice ray tracer; flat mode reduces to a single bounce off the bare base plate.
- Aspect ratio / packing fraction — taller, denser wires narrow the escape gaps and raise the average bounce count per photon before it can escape.
- Incidence angle — sets the drive beam's entry direction and the flat-target baseline it is compared against.
- Intensity — the measured absorbed fraction of this drive intensity feeds Thot through the same relativistic ponderomotive scaling law used in fast-ignition ICF research.