Fourier Series Pathfinding