Generation of Electromagnetic Fields