Electromagnetic field patterns for a box