lorenz_mie_coefs
lorenz_mie_coefs(radius_m, wavelength_m, n_p, n_med) ⇒ Float64Array
Implementation of Lorenz-Mie theory. Useful for calculating physically correct radiation scattering events for particles in a medium.
Kind: global function
Returns: Float64Array - Mie coefficients a_n and b_n in form [a_n0.r, a_n0.i, b_n0.r, b_n0.i, ... a_nN.r, a_nN.i, b_nN.r, b_nN.i]
See
- "Computing the Scattering Properties of Participating Media Using Lorenz-Mie Theory", SIGGRAPH 2007 by Frisvad et al.
- https://en.wikipedia.org/wiki/Mie_scattering
Author: Alexander Goldring (c) 2025
| Param | Type | Description |
|---|---|---|
| radius_m | number | Particle radius (in meters). |
| wavelength_m | number | Wavelength of light in vacuum (in meters). |
| n_p | vec2 | Complex refractive index of the particle |
| n_med | vec2 | Complex refractive index of the medium (e.g., [1.0, 0.0] for air). |