trajectory generation with choice of basis