tree-algorithm
======================================

In this section, we describe our ray-tracing algorithm that we use to solve the steady RT equation for a given frequency, $\nu$: $$\frac{{{\rm d}}I_\nu}{{{\rm d}}\tau_\nu} = - I_\nu + S_\nu, 
  \label{eq:rt}$$ where $I_\nu$, $\tau_\nu$, and $S_\nu$ are the specific intensity, the optical depth, and the source function, respectively. This equation is adequate for problems in which the absorption and emission coefficients change on timescales much longer than the light crossing time. This will always be the case in the volumes we will simulate by using our methods. Eqn. (\[eq:rt\]) has a formal solution: $$I_\nu(\tau_\nu) = I_{\nu, 0} \mathrm{e}^{- \tau_\nu} 
  + \int_0^{\tau_\nu} S_\nu(\tau'_\nu) \mathrm{e}^{-\tau_\nu + \tau'_\nu} {{\rm d}}\tau'_\nu, 
\label{eq:formal}$$ where $I_{\nu, 0}$ is the specific intensity at $\tau_\nu = 0$ and $\tau'_\nu$ is the optical depth at a position along the ray. Throughout this paper we employ so-called on-the-spot approximation [@agnagn] in which recombination photons are assumed to be absorbed where they were emitted. Using the on-the-spot approximation, the formal solution given by equation (\[eq:formal\]) is reduced to $$I_\nu(\tau_\nu) = I_{\nu, 0} \mathrm{e}^{- \tau_\nu}.  
\label{eq:formal2}$$ To solve this equation numerically, one needs to calculate optical depth between each pair of a source and a target mesh. The computational cost 