Modes of stable and unstable optical resonators.