You input any function to guide the red ball on the xy-plane to the goal.