is it possible to shape electromagnetic field? Is it possible to produce a magnetic field of specific shape? For example a magnetic field that will be confined in a cylindrical shape of specific dimensions.
 A: Maxwell's equations constrain what fields you can produce. Write down the field you are thinking of and check it for yourself! Suppose you want to create the field $\vec{B}(t,x,y,z)$. It must satisfy Gauss's law ($\nabla\cdot\vec{B}=0$ for every point in space and every time). This is a big constraint on the types of fields you can create. If the $\vec{B}$ you have in mind does satisfy Gauss's law then the other Maxwell's equations tell you what kind of $\vec{E}$, $\vec{J}$ and $\rho$ you need to produce the desired $\vec{B}$. If you want $\vec{E}=0$ then you have more constraints, for instance $\vec{B}$ cannot be a function of time. Then you just need a steady current $\vec{J}=\nabla\times\vec{B}$ and you can get your desired $\vec{B}$ field.
A: Using phased array antennas you can direct electromagnetic radiation into preferred directions, while suppressing in other directions. These work by arranging the relative phases of signals feeding the antenna array so that the effective radiation pattern of the array is reinforced (via constructive interference) in a particular direction and suppressed in other directions (via destructive interference.
