Thermal Radiation from Nanophotonic Structures: Theory, Numerical Simulation and Applications