Electromagnetic Field Control and Optimization Using Metamaterials