20 #ifndef ANTKEEPER_PHYSICS_LIGHT_PHOTOMETRY_HPP
21 #define ANTKEEPER_PHYSICS_LIGHT_PHOTOMETRY_HPP
44 template <
class T,
class UnaryOp1,
class UnaryOp2,
class InputIt>
47 auto spd_lef = [spd, lef](T x) -> T
49 return spd(x) * lef(x);
67 return max_luminous_efficacy<T> * efficiency;
std::invoke_result< UnaryOp, typename std::iterator_traits< InputIt >::value_type >::type simpson(UnaryOp f, InputIt first, InputIt last)
Approximates the definite integral of a function using Simpson's 1/3 rule.
T radiant_flux(T t, T a)
Calculates the radiant flux of a blackbody.
T luminous_efficiency(UnaryOp1 spd, UnaryOp2 lef, InputIt first, InputIt last)
Calculates the luminous efficiency of a light source.
T luminous_efficacy(T efficiency)
Calculates luminous efficacy given luminous efficiency.
constexpr T max_luminous_efficacy
Maximum luminous efficacy of an ideal monochromatic source, in lumen per watt.
T watts_to_lumens(T radiant_flux, T efficiency)
Converts watts (radiant flux) to lumens (luminous flux).