Create the BRDF from the directional scattering and write to SOFA file.
The directional scattering coefficient is assumed to be anisotropic.
The sum of the directional scattering coefficient has be equal to 1.
Therefore the BRDF is calculated as follows:
\(\mathbf{\Omega_i}\) and \(\mathbf{\Omega_o}\) are the
incident and outgoing directions, respectively.
\(s_{d}\) is the directional scattering coefficient [1].
\(\alpha\) is the absorption coefficient.
\(\mathbf{n}\) is the normal vector of the surface.
\(w_o\) is weighting factor of the outgoing angular sector
(unit sphere).
Note that the weights doesn’t need to be normalized,
they get scaled as required.
Parameters:
source_directions (Coordinates) – source directions for the BRDF, should contain weights.
cshape of data should be (n_sources)
receiver_directions (Coordinates) – receiver directions for the BRDF, should contain weights.
cshape of data should be (n_receivers)
directional_scattering (FrequencyData) – frequency dependent directional scattering coefficient data from [1].
cshape of data should be (n_sources, n_receivers).
absorption_coefficient (FrequencyData) – frequency dependent absorption coefficient data, by default
no absorption.
cshape of data should be (1, ).
file_path (string, path, optional) – path where sofa file should be saved, by default no file is saved.