#ifndef rdo_radiosity_H #define rdo_radiosity_H /* The finite element radiosity algorithm. */ #define rdo_radiosity_H_COPYRIGHT "Copyright © 2008 Danillo Pereira and J. Stolfi, UNICAMP" /* Last edited on 2024-12-21 11:51:52 by stolfi */ #include #include #include #include #include #include #include #include /* THE ITERATIVE RADIOSITY ALGORITHM The procedures below implement the iterative radiosity algorithm in terms of an arbitrary approximation basis with {n} elements. They require: {E[0..n-1]} approx basis coefficients for the spontaneous radiance function (due to emission, or scattering of light that comes from external sources). {L[0..n-1]} approx basis coefficients for the total radiance function (emission plus scattering). {*R} the radiance transfer matrix between coefficients of the basis. Both {E} and {L} are (column) vectors with {n} coefficients relative to the approximation basis, and {R} is an {n × n} matrix. */ void rdo_radiosity_initialize_basis_radiance(double E[], double L[], int n); /* Copies the emission coefficient vector {E[0..n-1]} into the total radiance coefficient vector {L[0..n-1]}. */ void rdo_radiosity_basis_transfer_iteration(double E[], dspmat_t *R, double L[], int n); /* Executes one iteration of the radiosity algorithm, namely {L = E + R*L}. */ #endif