Fourier series approximation of chain-encoded contours