New photonic crystal acts like a diode for radiation and could form new components for optical computers