  We give a geometrical theory of resonances in Maxwell's equations that
generalizes Mie formulae for spheres to any dielectric or metallic particle
without sharp edges. We show that the electromagnetic response of a particle is
given by a set of modes of internal and scattered fields and reveal a strong
analogy between resonances in nanoparticles and excess noise in unstable
macroscopic cavities. We give examples of two types of optical resonances:
those in which a single pair of internal and scattered modes become strongly
aligned in the sense defined in this paper, and those resulting from
constructive interference of many pairs of weakly aligned modes, an effect
relevant for sensing. We demonstrate that modes can be either bright or dark
depending on the incident field and give examples of how the excitation can be
optimized. Finally, we apply this theory to gold particles with shapes often
used in experiments.
