Antkeeper  0.0.1
Namespaces | Functions
physics::gas::atmosphere Namespace Reference

Atmosphere-related functions. More...

Namespaces

 density
 Atmospheric density functions.
 

Functions

template<class T >
polarization (T ior, T density)
 Calculates a particle polarizability factor. More...
 
template<class T >
scattering (T density, T polarization, T wavelength)
 Calculates a wavelength-dependent scattering coefficient. More...
 
template<class T >
scattering (T density, T polarization)
 Calculates a wavelength-independent scattering coefficient. More...
 
template<class T >
absorption (T scattering, T albedo)
 Calculates an absorption coefficient. More...
 
template<class T >
extinction (T scattering, T albedo)
 Calculates an extinction coefficient. More...
 
template<class T >
optical_depth_exp (const math::vec3< T > &a, const math::vec3< T > &b, T r, T sh, std::size_t n)
 Approximates the optical depth of exponentially-distributed atmospheric particles between two points using the trapezoidal rule. More...
 
template<class T >
optical_depth_tri (const math::vec3< T > &p0, const math::vec3< T > &p1, T r, T a, T b, T c, std::size_t n)
 Approximates the optical depth of triangularly-distributed atmospheric particles between two points using the trapezoidal rule. More...
 

Detailed Description

Atmosphere-related functions.

Function Documentation

◆ absorption()

template<class T >
T physics::gas::atmosphere::absorption ( scattering,
albedo 
)

Calculates an absorption coefficient.

Parameters
scatteringScattering coefficient.
albedoSingle-scattering albedo.
Returns
Absorption coefficient.
See also
https://en.wikipedia.org/wiki/Single-scattering_albedo

Definition at line 105 of file atmosphere.hpp.

◆ extinction()

template<class T >
T physics::gas::atmosphere::extinction ( scattering,
albedo 
)

Calculates an extinction coefficient.

Parameters
scatteringScattering coefficient.
albedoSingle-scattering albedo.
Returns
Extinction coefficient.
See also
https://en.wikipedia.org/wiki/Single-scattering_albedo

Definition at line 121 of file atmosphere.hpp.

◆ optical_depth_exp()

template<class T >
T physics::gas::atmosphere::optical_depth_exp ( const math::vec3< T > &  a,
const math::vec3< T > &  b,
r,
sh,
std::size_t  n 
)

Approximates the optical depth of exponentially-distributed atmospheric particles between two points using the trapezoidal rule.

Parameters
aStart point.
bEnd point.
rRadius of the planet.
shScale height of the atmospheric particles.
nNumber of samples.
Returns
Optical depth between a and b.

Definition at line 137 of file atmosphere.hpp.

◆ optical_depth_tri()

template<class T >
T physics::gas::atmosphere::optical_depth_tri ( const math::vec3< T > &  p0,
const math::vec3< T > &  p1,
r,
a,
b,
c,
std::size_t  n 
)

Approximates the optical depth of triangularly-distributed atmospheric particles between two points using the trapezoidal rule.

Parameters
p0Start point.
p1End point.
rRadius of the planet.
aDistribution lower limit.
bDistribution upper limit.
cDistribution upper mode.
nNumber of samples.
Returns
Optical depth between a and b.

Definition at line 174 of file atmosphere.hpp.

◆ polarization()

template<class T >
T physics::gas::atmosphere::polarization ( ior,
density 
)

Calculates a particle polarizability factor.

Parameters
iorAtmospheric index of refraction.
densityMolecular number density, in mol/m-3.
Returns
Polarizability factor.
See also
Elek, O., & Kmoch, P. (2010). Real-time spectral scattering in large-scale natural participating media. Proceedings of the 26th Spring Conference on Computer Graphics - SCCG ’10. doi:10.1145/1925059.1925074
Elek, Oskar. (2009). Rendering Parametrizable Planetary Atmospheres with Multiple Scattering in Real-Time.

Definition at line 45 of file atmosphere.hpp.

◆ scattering() [1/2]

template<class T >
T physics::gas::atmosphere::scattering ( density,
polarization 
)

Calculates a wavelength-independent scattering coefficient.

Parameters
densityMolecular number density of the particles, in mol/m-3.
polarizationParticle polarizability factor.
Returns
Scattering coefficient.
See also
atmosphere::polarization
Elek, O., & Kmoch, P. (2010). Real-time spectral scattering in large-scale natural participating media. Proceedings of the 26th Spring Conference on Computer Graphics - SCCG ’10. doi:10.1145/1925059.1925074
Elek, Oskar. (2009). Rendering Parametrizable Planetary Atmospheres with Multiple Scattering in Real-Time.

Definition at line 89 of file atmosphere.hpp.

◆ scattering() [2/2]

template<class T >
T physics::gas::atmosphere::scattering ( density,
polarization,
wavelength 
)

Calculates a wavelength-dependent scattering coefficient.

Parameters
densityMolecular number density of the particles, in mol/m-3.
polarizationParticle polarizability factor.
wavelengthWavelength of light, in meters.
Returns
Scattering coefficient.
See also
atmosphere::polarization
Elek, O., & Kmoch, P. (2010). Real-time spectral scattering in large-scale natural participating media. Proceedings of the 26th Spring Conference on Computer Graphics - SCCG ’10. doi:10.1145/1925059.1925074
Elek, Oskar. (2009). Rendering Parametrizable Planetary Atmospheres with Multiple Scattering in Real-Time.

Definition at line 69 of file atmosphere.hpp.