Introduction to photonic crystals and metamaterials