In analogy to the asymmetric transport of electricity in a familiar electrical diode, a thermal rectifier transports heat more favorably in one direction than in the reverse direction. One approach to thermal rectification is asymmetric scattering of phonons and/or electrons, similar to suggestions in the literature for a sawtooth nanowire  or 2-dimensional electron gas with triangular scatterers . To model the asymmetric heat transport in such nanostructures, we have used phonon ray-tracing, focusing on characteristic lengths that are small compared to the mean free path of phonons in bulk. To calculate the heat transfer we use a transmission-based (Landauer-Buttiker) method. The system geometry is described by a four-dimensional transfer function that depends on the position and angle of phonon emission and absorption from each of two contacts. At small temperature gradients, the phonon distribution function is very close to the usual isotropic equilibrium (Bose-Einstein) distribution, and there is no thermal rectification. In contrast, at large temperature gradients, the anisotropy in the phonon distribution function becomes significant, and the resulting heat flux vs. temperature curve (analogous to I-V curve of a diode) reveals large thermal rectification.