@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
146 lines (144 loc) • 4.92 kB
JavaScript
import {
ParameterLookupTable
} from "../../../../engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js";
/**
* Complex refractive index of pollen (sporopollenin-rich organic shell): n + i k, wavelength in nm.
* Assumptions: dry pollen (no internal water), ~300 K, bulk-effective constants; morphology not modeled.
* Notes and composite sources/guidance:
* - Pollen exine composed largely of sporopollenin; visible n typically ~1.53–1.57; very small k in visible, stronger in UV.
* - Organic functional groups show bands: strong C–H/O–H stretch complex near 3.2–3.5 µm, carbonyl/other modes near 5.8–6.2 µm,
* and features around 6.8–7.3 µm; far-IR tails are modest compared to silicates.
* - This LUT is designed for radiometric/Mie use over 200–20,000 nm with linear interpolation. Sampling is denser near bands.
* - Composite guidance: polymer/biopolymer optics (e.g., Querry optical constants compendium), aerosol brown-organics literature,
* and typical measured visible n for biological tissues/pollen. Values are smooth and representative, not species-specific.
*/
const POLLEN_REFRACTION_INDEX_LUT = ParameterLookupTable.from(
2, // columns: [n, k]
[
// UV (short-wave): strong absorption; n slightly higher
1.600, 1.50e-1, // 200 nm
1.590, 1.00e-1, // 220 nm
1.580, 6.00e-2, // 240 nm
1.575, 3.50e-2, // 260 nm
1.565, 2.00e-2, // 280 nm
1.560, 1.00e-2, // 300 nm
1.555, 6.00e-3, // 320 nm
1.552, 4.00e-3, // 340 nm
1.550, 3.00e-3, // 360 nm
1.548, 2.50e-3, // 380 nm
// Visible (400–700 nm): weak absorption; slight dispersion in n
1.547, 2.20e-3, // 400 nm
1.545, 1.60e-3, // 450 nm
1.543, 1.00e-3, // 500 nm
1.542, 8.00e-4, // 550 nm
1.541, 7.00e-4, // 600 nm
1.5405, 6.50e-4, // 650 nm
1.5400, 6.00e-4, // 700 nm
// NIR/SWIR (0.75–2.5 µm): weak k with mild overtone features
1.5395, 6.00e-4, // 750 nm
1.5390, 5.80e-4, // 800 nm
1.5380, 6.20e-4, // 900 nm
1.5370, 7.00e-4, // 1000 nm
1.5365, 7.20e-4, // 1064 nm
1.5355, 7.00e-4, // 1200 nm
1.5350, 8.00e-4, // 1300 nm
1.5340, 1.50e-3, // 1450 nm (overtone bump)
1.5335, 1.20e-3, // 1550 nm
1.5330, 1.00e-3, // 1650 nm
1.5325, 9.50e-4, // 1750 nm
1.5320, 2.00e-3, // 1940 nm (combination band region)
1.5320, 1.80e-3, // 2000 nm
1.5315, 2.50e-3, // 2200 nm
1.5310, 3.00e-3, // 2400 nm
1.5310, 3.50e-3, // 2500 nm
// Mid-IR (2.7–5 µm): strong organic stretch bands near 3.2–3.5 µm
1.5310, 6.00e-3, // 2700 nm
1.5320, 1.50e-2, // 2900 nm
1.5330, 1.50e-1, // 3000 nm (onset of stretch complex)
1.5350, 2.00e-1, // 3100 nm
1.5370, 2.50e-1, // 3200 nm
1.5380, 2.80e-1, // 3300 nm
1.5385, 3.00e-1, // 3400 nm (C–H/O–H peak)
1.5380, 2.70e-1, // 3500 nm
1.5370, 1.50e-1, // 3700 nm
1.5360, 8.00e-2, // 4000 nm
1.5350, 5.00e-2, // 4500 nm
1.5340, 3.50e-2, // 5000 nm (5 µm)
// Long-wave IR (5–20 µm): bands near 5.8–6.2 µm and 6.8–7.3 µm; modest tail beyond
1.5335, 1.20e-1, // 6000 nm (≈6 µm band)
1.5330, 1.50e-1, // 6800 nm (6.8 µm feature)
1.5325, 1.10e-1, // 7000 nm
1.5320, 8.50e-2, // 7500 nm
1.5315, 7.00e-2, // 8000 nm
1.5310, 6.00e-2, // 9000 nm
1.5305, 1.00e-1, // 10000 nm (weak broader organic modes)
1.5300, 8.00e-2, // 12000 nm
1.5290, 6.00e-2, // 15000 nm
1.5280, 5.00e-2, // 20000 nm (20 µm)
],
[
200,
220,
240,
260,
280,
300,
320,
340,
360,
380,
400,
450,
500,
550,
600,
650,
700,
750,
800,
900,
1000,
1064,
1200,
1300,
1450,
1550,
1650,
1750,
1940,
2000,
2200,
2400,
2500,
2700,
2900,
3000,
3100,
3200,
3300,
3400,
3500,
3700,
4000,
4500,
5000,
6000,
6800,
7000,
7500,
8000,
9000,
10000,
12000,
15000,
20000
]
);
/**
* 🌿 POLLEN (Organic)
* @param {number[]} result complex number, refraction index
* @param {number} wavelength_nm in nanometers
*/
export function ri_pollen(result, wavelength_nm) {
POLLEN_REFRACTION_INDEX_LUT.sample(wavelength_nm, result);
}