  RF cavities used in modern particle accelerators operate in TM$_{m10}$-like
modes composed of a single, dominant multipole of order $m$; $m=0$ modes are
used for the longitudinal acceleration of a particle beam and $m\neq0$ modes
for controlling transverse beam dynamics. The practical design of the latter,
however, can be complex and require extensive analysis through the iteration of
both approximate mathematical models and computationally expensive simulations
to optimise the performance of the structure. In this paper we present a new,
systematic method for designing azimuthally modulated RF cavities that support
modes composed of any number and magnitude of user-specified transverse
multipoles, either with or without a longitudinally accelerating component. Two
case studies are presented of RF cavity designs that support modes composed of
a longitudinally accelerating field in addition to a single transverse
multipole, and designs that support modes composed of two transverse
multipoles. We discuss generalising the discoveries and conclusions from the
two case studies to designing cavities that support modes composed of any
number of multipoles. The theoretical work is verified with analysis of 3D
simulations and experimental measurements are presented of a cavity operating
in a 3 GHz mode that simultaneously longitudinally accelerates and transversely
focuses a beam.
