UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

153 lines (151 loc) 4.95 kB
import { ParameterLookupTable } from "../../../../engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js"; /** * Complex refractive index of mineral dust (silicate-rich, e.g., Saharan): n + i k, wavelength in nm. * Assumptions: dry, ~300 K, bulk effective constants representative of a typical desert mineral dust * (quartz/feldspar/clays mix). Morphology not modeled; values intended for bulk-equivalent Mie. * * Composite sources and notes: * - OPAC mineral dust (Hess et al., 1998) — visible/NIR anchors (m ≈ 1.53 + 0.008i at 0.55 µm). * - Sokolik & Toon (1999), JGR 104, 9423–9444 — spectral behavior and strong Si–O features in 8–12 µm. * - Querry (1985/1991), Optical constants of minerals — silicate trends in MIR/LWIR (quartz/feldspars/clays). * - Patterson, Winchester & Barlow (1977), and Shettle & Fenn (1979) — atmospheric dust guidance. * * Table design: * - 200–20,000 nm coverage; linear interpolation by ParameterLookupTable. * - Preserves your original 400–700 nm values exactly to avoid visible-range regressions in graphics. * - Denser sampling near 3 µm OH-complex and the strong 9–10 µm Si–O reststrahlen band. */ const DUST_REFRACTION_INDEX_LUT = ParameterLookupTable.from( 2, // number of columns in the table [n, k] // Lookup data (n, k) per wavelength below. Wavelength positions are in nm. [ // UV (short-wave): increasing absorption towards deep UV 1.550, 6.0e-2, // 200 nm 1.540, 3.5e-2, // 220 nm 1.535, 2.0e-2, // 240 nm 1.530, 1.5e-2, // 260 nm 1.525, 1.1e-2, // 280 nm 1.523, 9.5e-3, // 300 nm 1.522, 9.0e-3, // 320 nm 1.521, 8.7e-3, // 340 nm 1.5205, 8.5e-3, // 360 nm 1.5200, 8.4e-3, // 380 nm // Visible (preserve exact legacy values for 400–700 nm) 1.5200, 8.2e-3, // 400 nm 1.5200, 7.0e-3, // 450 nm 1.5200, 6.0e-3, // 500 nm 1.5200, 5.0e-3, // 550 nm 1.5100, 4.0e-3, // 600 nm 1.5100, 3.5e-3, // 650 nm 1.5100, 3.0e-3, // 700 nm // NIR/SWIR (0.7–2.5 µm): modest absorption; slight dispersion in n 1.5150, 3.2e-3, // 750 nm 1.5140, 3.0e-3, // 800 nm 1.5130, 3.2e-3, // 900 nm 1.5120, 3.5e-3, // 1000 nm 1.5120, 3.8e-3, // 1064 nm 1.5110, 4.5e-3, // 1200 nm 1.5100, 5.5e-3, // 1300 nm 1.5090, 8.0e-3, // 1450 nm 1.5080, 7.0e-3, // 1550 nm 1.5070, 6.5e-3, // 1650 nm 1.5060, 6.2e-3, // 1750 nm 1.5050, 7.0e-3, // 1940 nm 1.5050, 7.5e-3, // 2000 nm 1.5040, 9.0e-3, // 2200 nm 1.5030, 1.2e-2, // 2400 nm 1.5030, 1.4e-2, // 2500 nm // Mid-IR (2.5–5 µm): increasing absorption toward lattice/OH bands 1.5030, 2.0e-2, // 2700 nm 1.5040, 3.0e-2, // 2900 nm 1.5050, 3.5e-2, // 3000 nm 1.5060, 4.0e-2, // 3100 nm 1.5080, 4.5e-2, // 3200 nm 1.5100, 5.0e-2, // 3300 nm 1.5120, 5.5e-2, // 3500 nm 1.5150, 6.0e-2, // 3700 nm 1.5180, 7.0e-2, // 4000 nm 1.5220, 8.0e-2, // 4500 nm 1.5250, 9.0e-2, // 5000 nm (5 µm) // Long-wave IR (5–20 µm): strong Si–O stretch band near 9–10 µm 1.5300, 1.2e-1, // 6000 nm 1.5400, 1.8e-1, // 7000 nm 1.5500, 3.0e-1, // 8000 nm 1.5600, 4.0e-1, // 8500 nm 1.5700, 5.5e-1, // 9000 nm 1.5800, 7.0e-1, // 9500 nm 1.5900, 8.0e-1, // 10000 nm (10 µm) 1.5800, 5.0e-1, // 11000 nm 1.5600, 3.0e-1, // 12000 nm 1.5300, 1.5e-1, // 15000 nm 1.5000, 8.0e-2, // 20000 nm (20 µm) ], // Wavelength positions (nm) corresponding to the (n,k) pairs above [ 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, 3500, 3700, 4000, 4500, 5000, 6000, 7000, 8000, 8500, 9000, 9500, 10000, 11000, 12000, 15000, 20000 ] ); /** * 💨 MINERAL DUST * @param {number[]} result complex number, refraction index * @param {number} wavelength_nm in nanometers */ export function ri_dust(result, wavelength_nm) { DUST_REFRACTION_INDEX_LUT.sample(wavelength_nm, result); }