Modeling large electorates with Fourier series, with applications to Nash equilibria in proximity and directional models of spatial competition