CS 480/680 Computer Graphics Fundamentals
$$L_o(\mathbf{x} \rightarrow \omega_o) = L_e(\mathbf{x} \rightarrow \omega_o) + \int_{\Omega}{f_r(\omega_i, \omega_o) L_i(\omega_i \rightarrow \mathbf{x}) (\omega_i \cdot \mathbf{n}) \, d\omega_i}$$
Sample Source Code: Check GitHub