  In electrical engineering metamaterials have been developed that offer
unprecedented control over electromagnetic fields. Here we show that general
relativity lends the theoretical tools for designing devices made of such
versatile materials. Given a desired device function, the theory describes the
electromagnetic properties that turn this function into fact. We consider media
that facilitate space-time transformations and include negative refraction. Our
theory unifies the concepts operating behind the scenes of perfect invisibility
devices, perfect lenses, the optical Aharonov-Bohm effect and electromagnetic
analogs of the event horizon, and may lead to further applications.
