Square Orbits and Fourier Series