Smart Optical and Magnetic Materials