Skip to main content

Crate optica

Crate optica 

Source
Expand description

§optica — participating-media and optics foundations

optica provides fast, typed building blocks for optics and radiative-transfer workloads: rays, optical coefficients, scattering phase functions, sampled spectra, interpolation tables, and optical-depth integration kernels.

The crate is intentionally domain-agnostic. It does not include astronomy, planetary constants, ephemerides, or site-specific policies.

§Feature flags

  • std (default): enables std-dependent helpers (ASCII loader, etc.).
  • alloc: enables heap-backed containers in no_std builds. All public types that use Vec/Box/String are gated behind alloc or std.
  • serde: derives Serialize/Deserialize for the public data, error, and policy enums.

§References

  • Chandrasekhar, Radiative Transfer.
  • Bodhaine et al. (1999), Rayleigh optical-depth approximation.

Re-exports§

pub use grid::AxisDirection;
pub use grid::ConstantRegion;

Modules§

data
Provenance metadata for tabulated optics inputs and generated products.
grid
Typed interpolation grids for optics workloads.
medium
Participating-medium abstractions and optical coefficients.
phase
Scattering phase functions for participating-media models.
prelude
Convenient re-exports for common optica workflows.
ray
Typed rays and ray segments.
scatter
Generic single-scattering depth parameterizations.
spectrum
Sampled-spectrum container, interpolation, integration, and loaders.
transport
Optical-depth integration and transport helpers.