Generation of a closed curve with fourier representation