lsurf.materials.AIR_STP

lsurf.materials.AIR_STP = <HomogeneousMaterial('Air (STP)', n=1.0003)>

Homogeneous material with constant optical properties.

Properties are uniform throughout space but can depend on wavelength. Supports analytic dispersion models (Sellmeier, Cauchy) or custom functions.

Parameters:
  • name (str) – Descriptive name for this material.

  • refractive_index (float or callable) – Refractive index value or function f(wavelength) -> n. If float, uses constant n for all wavelengths. If callable, wavelength is in meters.

  • absorption_coef (float, optional) – Absorption coefficient α in m⁻¹. Default is 0.

  • scattering_coef (float, optional) – Scattering coefficient μ_s in m⁻¹. Default is 0.

  • anisotropy (float, optional) – Henyey-Greenstein anisotropy factor g ∈ [-1, 1]. Default is 0.

lsurf.materials.refractive_index

Refractive index specification.

Type:

float or callable

lsurf.materials.absorption_coef

Absorption coefficient in m⁻¹.

Type:

float

lsurf.materials.scattering_coef

Scattering coefficient in m⁻¹.

Type:

float

lsurf.materials.anisotropy

Scattering anisotropy factor.

Type:

float

Examples

>>> # Constant refractive index
>>> glass = HomogeneousMaterial("Glass", 1.5)
>>> # Wavelength-dependent (Cauchy dispersion)
>>> def cauchy_n(wavelength):
...     wl_um = wavelength * 1e6
...     return 1.5 + 0.01 / wl_um**2
>>> glass = HomogeneousMaterial("Glass", cauchy_n)
>>> # With absorption (colored glass)
>>> colored_glass = HomogeneousMaterial(
...     "Red Glass", 1.52, absorption_coef=0.1
... )

Notes

For homogeneous materials: - Rays propagate in straight lines (no gradient-driven bending) - Reflection/refraction occurs only at interfaces - Beer-Lambert absorption: I(d) = I₀ exp(-αd) - No GPU kernels are needed (straight-line propagation)